Clear measurements on text size changes

This commit is contained in:
M66B 2020-09-06 16:26:17 +02:00
parent 2a5ce4f2b8
commit 1b5970a483
1 changed files with 9 additions and 0 deletions

View File

@ -4109,6 +4109,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
int zoom = prefs.getInt("view_zoom", compact ? 0 : 1);
zoom = ++zoom % 3;
prefs.edit().putInt("view_zoom", zoom).apply();
clearMeasurements();
adapter.setZoom(zoom);
}
@ -4122,9 +4123,17 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
adapter.setCompact(compact);
adapter.setZoom(zoom);
clearMeasurements();
getActivity().invalidateOptionsMenu();
}
private void clearMeasurements() {
scales.clear();
sizes.clear();
heights.clear();
positions.clear();
}
private void onMenuSelectLanguage() {
Bundle args = new Bundle();
args.putLong("account", account);