mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-22 11:55:31 +01:00
fix: crash in Comments and CheckBox
This commit is contained in:
parent
1ab27f6b27
commit
d845030973
@ -119,21 +119,11 @@ public class TextCheckCell extends FrameLayout {
|
||||
valueTextView.setEllipsize(TextUtils.TruncateAt.END);
|
||||
addView(valueTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 64 : padding, 36, LocaleController.isRTL ? padding : 64, 0));
|
||||
|
||||
if (!dialog) {
|
||||
|
||||
checkBox = new Switch(context, resourcesProvider);
|
||||
checkBox.setColors(Theme.key_switchTrack, Theme.key_switchTrackChecked, Theme.key_windowBackgroundWhite, Theme.key_windowBackgroundWhite);
|
||||
addView(checkBox, LayoutHelper.createFrame(37, 20, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, 22, 0, 22, 0));
|
||||
|
||||
} else {
|
||||
|
||||
checkBoxSquare = new CheckBoxSquare(context,true);
|
||||
addView(checkBoxSquare, LayoutHelper.createFrame(18, 18, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, 22, 0, 22, 0));
|
||||
|
||||
}
|
||||
checkBox = new Switch(context, resourcesProvider);
|
||||
checkBox.setColors(Theme.key_switchTrack, Theme.key_switchTrackChecked, Theme.key_windowBackgroundWhite, Theme.key_windowBackgroundWhite);
|
||||
addView(checkBox, LayoutHelper.createFrame(37, 20, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, 22, 0, 22, 0));
|
||||
|
||||
setClipChildren(false);
|
||||
|
||||
isRTL = LocaleController.isRTL;
|
||||
}
|
||||
|
||||
|
@ -14921,7 +14921,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
translateItem.setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() > 0);
|
||||
if (translateItem != null)
|
||||
translateItem.setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() > 0);
|
||||
actionModeOtherItem.setSubItemVisibility(nkbtn_sharemessage, selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() > 0);
|
||||
|
||||
boolean allowPin = false;
|
||||
|
Loading…
Reference in New Issue
Block a user