From cff13d53f0141f907fd26553dfe23ba113c8491c Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
Date: Sun, 25 Dec 2022 13:22:41 +0800
Subject: [PATCH] Forgot to revert the optimistism

---
 src/components/status.jsx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/components/status.jsx b/src/components/status.jsx
index b000f483..22d40def 100644
--- a/src/components/status.jsx
+++ b/src/components/status.jsx
@@ -533,6 +533,8 @@ function Status({
                         }
                       } catch (e) {
                         console.error(e);
+                        // Revert optimistism
+                        states.statuses.set(id, status);
                       }
                     }}
                   />
@@ -564,6 +566,8 @@ function Status({
                       }
                     } catch (e) {
                       console.error(e);
+                      // Revert optimistism
+                      states.statuses.set(statusID, status);
                     }
                   }}
                 />
@@ -591,6 +595,8 @@ function Status({
                       }
                     } catch (e) {
                       console.error(e);
+                      // Revert optimistism
+                      states.statuses.set(statusID, status);
                     }
                   }}
                 />