Skip to content

Commit

Permalink
Merge pull request #21404 from osmandapp/fix_#21326
Browse files Browse the repository at this point in the history
Fix #21326
  • Loading branch information
Chumva authored Nov 20, 2024
2 parents fa6b292 + cda2b09 commit a31fabd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,9 @@ public void updateColors(@NonNull TextState textState) {
}

@Override
public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel,
@NonNull List<MapWidget> followingWidgets) {
public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List<MapWidget> followingWidgets) {
ViewGroup specialContainer = getSpecialContainer();
specialContainer.removeAllViews();

specialPosition = followingWidgets.isEmpty();
specialPosition = panel == WidgetsPanel.TOP && followingWidgets.isEmpty();
if (specialPosition) {
specialContainer.removeAllViews();
specialContainer.addView(view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ public void copySettings(@NonNull ApplicationMode appMode, @Nullable String cust
public void copySettingsFromMode(@NonNull ApplicationMode sourceAppMode, @NonNull ApplicationMode appMode, @Nullable String customId) {
}

public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel,
@NonNull List<MapWidget> followingWidgets) {
public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List<MapWidget> followingWidgets) {
container.addView(view);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,9 @@ protected boolean updateVisibility(boolean visible) {
}

@Override
public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel,
@NonNull List<MapWidget> followingWidgets) {
public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List<MapWidget> followingWidgets) {
ViewGroup specialContainer = getSpecialContainer();
boolean useSpecialPosition = widgetsPanel == WidgetsPanel.TOP && specialContainer != null;
boolean useSpecialPosition = panel == WidgetsPanel.TOP && specialContainer != null;
if (useSpecialPosition) {
specialContainer.removeAllViews();

Expand Down

0 comments on commit a31fabd

Please sign in to comment.