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
This commit is contained in:
parent
0e8723c3bb
commit
0f4bfcb05d
4 changed files with 133 additions and 172 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue