Fix - Bug in Configure Screen
This commit is contained in:
parent
8fda5674c9
commit
709380d207
2 changed files with 10 additions and 3 deletions
|
@ -37,6 +37,7 @@ import com.github.ksoichiro.android.observablescrollview.ScrollState;
|
|||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ValueHolder;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnRowItemClick;
|
||||
|
@ -128,6 +129,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
|
|||
private boolean visible = false;
|
||||
private DashboardType visibleType;
|
||||
private DashboardType previousVisibleType;
|
||||
private ApplicationMode previousAppMode;
|
||||
private boolean landscape;
|
||||
private List<WeakReference<DashBaseFragment>> fragList = new LinkedList<>();
|
||||
private net.osmand.Location myLocation;
|
||||
|
@ -659,7 +661,11 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
|
|||
nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
||||
this.previousVisibleType = prevItem;
|
||||
this.visible = visible;
|
||||
boolean refresh = this.visibleType == type;
|
||||
ApplicationMode currentAppMode = getMyApplication().getSettings().APPLICATION_MODE.get();
|
||||
boolean appModeChanged = currentAppMode != previousAppMode;
|
||||
|
||||
boolean refresh = this.visibleType == type && !appModeChanged;
|
||||
previousAppMode = currentAppMode;
|
||||
this.visibleType = type;
|
||||
DashboardOnMap.staticVisible = visible;
|
||||
DashboardOnMap.staticVisibleType = type;
|
||||
|
|
|
@ -268,8 +268,9 @@ public class ConfigureMapMenu {
|
|||
view.getSettings().DAYNIGHT_MODE.set(OsmandSettings.DayNightMode.values()[which]);
|
||||
refreshMapComplete(activity);
|
||||
dialog.dismiss();
|
||||
adapter.setItemDescription(pos, getDayNightDescr(activity));
|
||||
ad.notifyDataSetInvalidated();
|
||||
activity.getDashboard().refreshContent(true);
|
||||
//adapter.setItemDescription(pos, getDayNightDescr(activity));
|
||||
//ad.notifyDataSetInvalidated();
|
||||
}
|
||||
});
|
||||
bld.show();
|
||||
|
|
Loading…
Reference in a new issue