Skip to content

Commit

Permalink
Reorder message menu
Browse files Browse the repository at this point in the history
  • Loading branch information
satouriko committed Feb 16, 2020
1 parent a893416 commit c9582ed
Showing 1 changed file with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ private void updateRows() {
pauseMusicOnRecordRow = rowCount++;
mapPreviewRow = rowCount++;
stickerSizeRow = rowCount++;
translationProviderRow = rowCount++;
messageMenuRow = rowCount++;
translationProviderRow = rowCount++;
chat2Row = rowCount++;
settingsRow = rowCount++;
hidePhoneRow = rowCount++;
Expand Down Expand Up @@ -647,43 +647,43 @@ private void showMessageMenuAlert() {
TextCheckCell textCell = new TextCheckCell(context);
switch (a) {
case 0: {
textCell.setTextAndCheck(LocaleController.getString("AddToSavedMessages", R.string.AddToSavedMessages), NekoConfig.showAddToSavedMessages, false);
textCell.setTextAndCheck(LocaleController.getString("DeleteDownloadedFile", R.string.DeleteDownloadedFile), NekoConfig.showDeleteDownloadedFile, false);
break;
}
case 1: {
textCell.setTextAndCheck(LocaleController.getString("Prpr", R.string.Prpr), NekoConfig.showPrPr, false);
textCell.setTextAndCheck(LocaleController.getString("AddToSavedMessages", R.string.AddToSavedMessages), NekoConfig.showAddToSavedMessages, false);
break;
}
case 2: {
textCell.setTextAndCheck(LocaleController.getString("ViewHistory", R.string.ViewHistory), NekoConfig.showViewHistory, false);
textCell.setTextAndCheck(LocaleController.getString("Repeat", R.string.Repeat), NekoConfig.showRepeat, false);
break;
}
case 3: {
textCell.setTextAndCheck(LocaleController.getString("ReportChat", R.string.ReportChat), NekoConfig.showReport, false);
textCell.setTextAndCheck(LocaleController.getString("Prpr", R.string.Prpr), NekoConfig.showPrPr, false);
break;
}
case 4: {
textCell.setTextAndCheck(LocaleController.getString("EditAdminRights", R.string.EditAdminRights), NekoConfig.showAdminActions, false);
textCell.setTextAndCheck(LocaleController.getString("ViewHistory", R.string.ViewHistory), NekoConfig.showViewHistory, false);
break;
}
case 5: {
textCell.setTextAndCheck(LocaleController.getString("ChangePermissions", R.string.ChangePermissions), NekoConfig.showChangePermissions, false);
textCell.setTextAndCheck(LocaleController.getString("MessageDetails", R.string.MessageDetails), NekoConfig.showMessageDetails, false);
break;
}
case 6: {
textCell.setTextAndCheck(LocaleController.getString("DeleteDownloadedFile", R.string.DeleteDownloadedFile), NekoConfig.showDeleteDownloadedFile, false);
textCell.setTextAndCheck(LocaleController.getString("Translate", R.string.Translate), NekoConfig.showTranslate, false);
break;
}
case 7: {
textCell.setTextAndCheck(LocaleController.getString("MessageDetails", R.string.MessageDetails), NekoConfig.showMessageDetails, false);
textCell.setTextAndCheck(LocaleController.getString("ReportChat", R.string.ReportChat), NekoConfig.showReport, false);
break;
}
case 8: {
textCell.setTextAndCheck(LocaleController.getString("Translate", R.string.Translate), NekoConfig.showTranslate, false);
textCell.setTextAndCheck(LocaleController.getString("EditAdminRights", R.string.EditAdminRights), NekoConfig.showAdminActions, false);
break;
}
case 9: {
textCell.setTextAndCheck(LocaleController.getString("Repeat", R.string.Repeat), NekoConfig.showRepeat, false);
textCell.setTextAndCheck(LocaleController.getString("ChangePermissions", R.string.ChangePermissions), NekoConfig.showChangePermissions, false);
break;
}
}
Expand All @@ -694,53 +694,53 @@ private void showMessageMenuAlert() {
Integer tag = (Integer) v2.getTag();
switch (tag) {
case 0: {
NekoConfig.toggleShowAddToSavedMessages();
textCell.setChecked(NekoConfig.showAddToSavedMessages);
NekoConfig.toggleShowDeleteDownloadedFile();
textCell.setChecked(NekoConfig.showDeleteDownloadedFile);
break;
}
case 1: {
NekoConfig.toggleShowPrPr();
textCell.setChecked(NekoConfig.showPrPr);
NekoConfig.toggleShowAddToSavedMessages();
textCell.setChecked(NekoConfig.showAddToSavedMessages);
break;
}
case 2: {
NekoConfig.toggleShowViewHistory();
textCell.setChecked(NekoConfig.showViewHistory);
NekoConfig.toggleShowRepeat();
textCell.setChecked(NekoConfig.showRepeat);
break;
}
case 3: {
NekoConfig.toggleShowReport();
textCell.setChecked(NekoConfig.showReport);
NekoConfig.toggleShowPrPr();
textCell.setChecked(NekoConfig.showPrPr);
break;
}
case 4: {
NekoConfig.toggleShowAdminActions();
textCell.setChecked(NekoConfig.showAdminActions);
NekoConfig.toggleShowViewHistory();
textCell.setChecked(NekoConfig.showViewHistory);
break;
}
case 5: {
NekoConfig.toggleShowChangePermissions();
textCell.setChecked(NekoConfig.showChangePermissions);
NekoConfig.toggleShowMessageDetails();
textCell.setChecked(NekoConfig.showMessageDetails);
break;
}
case 6: {
NekoConfig.toggleShowDeleteDownloadedFile();
textCell.setChecked(NekoConfig.showDeleteDownloadedFile);
NekoConfig.toggleShowTranslate();
textCell.setChecked(NekoConfig.showTranslate);
break;
}
case 7: {
NekoConfig.toggleShowMessageDetails();
textCell.setChecked(NekoConfig.showMessageDetails);
NekoConfig.toggleShowReport();
textCell.setChecked(NekoConfig.showReport);
break;
}
case 8: {
NekoConfig.toggleShowTranslate();
textCell.setChecked(NekoConfig.showTranslate);
NekoConfig.toggleShowAdminActions();
textCell.setChecked(NekoConfig.showAdminActions);
break;
}
case 9: {
NekoConfig.toggleShowRepeat();
textCell.setChecked(NekoConfig.showRepeat);
NekoConfig.toggleShowChangePermissions();
textCell.setChecked(NekoConfig.showChangePermissions);
break;
}
}
Expand Down Expand Up @@ -938,7 +938,7 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
} else if (position == stickerSizeRow) {
textCell.setTextAndValue(LocaleController.getString("StickerSize", R.string.StickerSize), String.valueOf(Math.round(NekoConfig.stickerSize)), true);
} else if (position == messageMenuRow) {
textCell.setText(LocaleController.getString("MessageMenu", R.string.MessageMenu), false);
textCell.setText(LocaleController.getString("MessageMenu", R.string.MessageMenu), true);
} else if (position == deleteAccountRow) {
textCell.setText(LocaleController.getString("DeleteAccount", R.string.DeleteAccount), false);
textCell.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText));
Expand All @@ -965,7 +965,7 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
value = LocaleController.getString("ProviderLingocloud", R.string.ProviderLingocloud);
break;
}
textCell.setTextAndValue(LocaleController.getString("TranslationProvider", R.string.TranslationProvider), value, true);
textCell.setTextAndValue(LocaleController.getString("TranslationProvider", R.string.TranslationProvider), value, false);
}
break;
}
Expand Down

0 comments on commit c9582ed

Please sign in to comment.