From 6688ad3b91d04afbefd0aaf9f049f5f36f6f30cc Mon Sep 17 00:00:00 2001 From: Ash <> Date: Sun, 1 Mar 2020 21:48:14 +0530 Subject: [PATCH] Fix a visibility issue in osm card --- .../main/java/app/fedilab/nitterizeme/MainActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/nitterizeme/MainActivity.java b/app/src/main/java/app/fedilab/nitterizeme/MainActivity.java index d0afc00..65c278c 100644 --- a/app/src/main/java/app/fedilab/nitterizeme/MainActivity.java +++ b/app/src/main/java/app/fedilab/nitterizeme/MainActivity.java @@ -220,7 +220,6 @@ public class MainActivity extends AppCompatActivity { SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putBoolean(SET_OSM_ENABLED, isChecked); editor.apply(); - osm_current_group.setVisibility(isChecked ? View.VISIBLE : View.GONE); osm_custom_group.setVisibility(View.GONE); enable_geo_uris.setVisibility(isChecked ? View.VISIBLE : View.GONE); expand_instance_osm.setRotation(0); @@ -232,6 +231,8 @@ public class MainActivity extends AppCompatActivity { } else { osm_current_group.setVisibility(View.VISIBLE); } + } else { + osm_current_group.setVisibility(View.GONE); } }); @@ -330,8 +331,10 @@ public class MainActivity extends AppCompatActivity { if (geouri_enabled) { osm_current_group.setVisibility(View.GONE); osm_custom_group.setVisibility(View.GONE); - } else { + } else if (osm_enabled){ osm_current_group.setVisibility(View.VISIBLE); + } else { + osm_custom_group.setVisibility(View.GONE); } save_instance_nitter.setOnClickListener(v -> {