Fix stickerset drag

This commit is contained in:
luvletter2333 2022-04-12 14:15:04 +08:00
parent b709d28bff
commit 324c39dded
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
2 changed files with 9 additions and 1 deletions

View File

@ -1819,6 +1819,14 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
final MediaDataController mediaDataController = MediaDataController.getInstance(currentAccount);
swapListElements(stickerSets, index1, index2);
if (stickersTab.tabsContainer != null) {
for (int i = fromPosition; i <= toPosition && i < stickersTab.tabsContainer.getChildCount(); i++) {
View v = stickersTab.tabsContainer.getChildAt(i);
v.setTag(R.id.index_tag, i);
}
}
if (hasChatStickers) {
swapListElements(mediaDataController.getStickerSets(MediaDataController.TYPE_IMAGE), index1 - 1, index2 - 1);
} else {

View File

@ -65,7 +65,7 @@ public class ScrollSlidingTabStrip extends HorizontalScrollView {
private Type type = Type.LINE;
private LinearLayout.LayoutParams defaultTabLayoutParams;
private LinearLayout.LayoutParams defaultExpandLayoutParams;
private LinearLayout tabsContainer;
public LinearLayout tabsContainer;
private ScrollSlidingTabStripDelegate delegate;
private HashMap<String, View> tabTypes = new HashMap<>();
private HashMap<String, View> prevTypes = new HashMap<>();