mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 20:54:51 +00:00
reorder in pack list
This commit is contained in:
2 files changed
+7
-1
No files matched your search
@@ -69,4 +69,10 @@ extension EmojiHoarder {
|
|||||||
}
|
}
|
||||||
saveEmojiPacks()
|
saveEmojiPacks()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func moveEmojiPack(from: IndexPath, to: IndexPath) {
|
||||||
|
let removed = emojiPacks.remove(at: from.row)
|
||||||
|
emojiPacks.insert(removed, at: to.row)
|
||||||
|
saveEmojiPacks()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -220,7 +220,7 @@ class EmojiPackListView: UITableViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
|
override func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
|
||||||
print(tableView, sourceIndexPath, destinationIndexPath)
|
self.emojiHoarder.moveEmojiPack(from: sourceIndexPath, to: destinationIndexPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, contextMenuConfigurationForRowAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
|
override func tableView(_ tableView: UITableView, contextMenuConfigurationForRowAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
|
||||||
|
|||||||