]> cat aescling's git repositories - mastodon.git/commitdiff
Port various forgotten fixes from upstream (#1864)
authorClaire <claire.github-309c@sitedethib.com>
Wed, 12 Oct 2022 17:03:28 +0000 (19:03 +0200)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 05:28:26 +0000 (00:28 -0500)
* [Glitch] Fix crash when failing to load emoji picker

Port bd3420b1398c4c4ab2e2f2850b6dd6eaff0d361b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
* [Glitch] Remove duplicate frequently used emojis

Port 98146281e1beaf994710b13ef70f6224e8588cba to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Harmon <Harmon758@gmail.com>
app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.js
app/javascript/flavours/glitch/features/compose/containers/emoji_picker_dropdown_container.js

index 0e49a35c3ede954638c507ef78ad2785f7e0f6f6..546d398a0b90d3a34477a48411db619dd9bdfa27 100644 (file)
@@ -345,7 +345,7 @@ class EmojiPickerDropdown extends React.PureComponent {
 
         this.setState({ loading: false });
       }).catch(() => {
-        this.setState({ loading: false });
+        this.setState({ loading: false, active: false });
       });
     }
 
index ba85edd87374be4872514ec8a5b2be0a1673f318..66d51947a89e2e6bc938ba49b185205410fd7ee1 100644 (file)
@@ -38,7 +38,8 @@ const getFrequentlyUsedEmojis = createSelector([
     .toArray();
 
   if (emojis.length < DEFAULTS.length) {
-    emojis = emojis.concat(DEFAULTS.slice(0, DEFAULTS.length - emojis.length));
+    let uniqueDefaults = DEFAULTS.filter(emoji => !emojis.includes(emoji));
+    emojis = emojis.concat(uniqueDefaults.slice(0, DEFAULTS.length - emojis.length));
   }
 
   return emojis;