From 7258dde9451a2ac0fa13db28606e80b12e043c14 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 20 Jan 2024 20:27:14 +0800 Subject: [PATCH] style: scroll to row after import settings --- .../nekomimi/nekogram/settings/BaseNekoXSettingsActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/BaseNekoXSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/BaseNekoXSettingsActivity.java index 39ea08de63..f5929236bd 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/BaseNekoXSettingsActivity.java +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/BaseNekoXSettingsActivity.java @@ -138,11 +138,12 @@ public void importToRow(String key, String value, Runnable unknown) { var builder = new AlertDialog.Builder(context); builder.setTitle(LocaleController.getString("ImportSettings", R.string.ImportSettings)); builder.setMessage(LocaleController.getString("ImportSettingsAlert", R.string.ImportSettingsAlert)); - builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); + builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), (dialogInter, i) -> scrollToRow(key, unknown)); builder.setPositiveButton(LocaleController.getString("Import", R.string.Import), (dialogInter, i) -> { config.changed(new_value); config.saveConfig(); updateRows(); + scrollToRow(key, unknown); }); builder.show(); } else {