diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-02 12:09:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 12:09:57 -0700 |
commit | 0f4bfcb05d4d902209126cca216eac31d49c8f80 (patch) | |
tree | 51de199207ed0d029f76aaf1125058bda1fc40d7 /src/state/models/ui/saved-feeds.ts | |
parent | 0e8723c3bb9566542f009994484b30c3da72ede7 (diff) | |
download | voidsky-0f4bfcb05d4d902209126cca216eac31d49c8f80.tar.zst |
Replace draglist due to upstream errors (#1795)
* Replace draggable flatlist with simple sort buttons * Remove react-native-draggable-flatlist dep * Fix hitslops * Update lockfile * Remove bad flex:1
Diffstat (limited to 'src/state/models/ui/saved-feeds.ts')
-rw-r--r-- | src/state/models/ui/saved-feeds.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/state/models/ui/saved-feeds.ts b/src/state/models/ui/saved-feeds.ts index 881684ee6..667bc03a3 100644 --- a/src/state/models/ui/saved-feeds.ts +++ b/src/state/models/ui/saved-feeds.ts @@ -95,19 +95,15 @@ export class SavedFeedsModel { return } if (direction === 'up' && index !== 0) { - const temp = pinned[index] - pinned[index] = pinned[index - 1] - pinned[index - 1] = temp + ;[pinned[index], pinned[index - 1]] = [pinned[index - 1], pinned[index]] } else if (direction === 'down' && index < pinned.length - 1) { - const temp = pinned[index] - pinned[index] = pinned[index + 1] - pinned[index + 1] = temp + ;[pinned[index], pinned[index + 1]] = [pinned[index + 1], pinned[index]] } + this._updatePinSortOrder(pinned.concat(this.unpinned.map(f => f.uri))) await this.rootStore.preferences.setSavedFeeds( this.rootStore.preferences.savedFeeds, pinned, ) - this._updatePinSortOrder() track('CustomFeed:Reorder', { name: item.displayName, uri: item.uri, |