small fixes
This commit is contained in:
parent
9a6d6049a4
commit
7dd3795ebe
3 changed files with 5 additions and 14 deletions
|
@ -29,7 +29,6 @@ import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.view.MenuItemCompat;
|
import androidx.core.view.MenuItemCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.Collator;
|
import net.osmand.Collator;
|
||||||
|
@ -426,11 +425,6 @@ public class UpdatesIndexFragment extends OsmAndListFragment implements Download
|
||||||
return LiveUpdatesFragment.getMapsToUpdate(listAdapter.mapsList, settings);
|
return LiveUpdatesFragment.getMapsToUpdate(listAdapter.mapsList, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Fragment currentFragment() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ColorRes
|
@ColorRes
|
||||||
public static int getDefaultIconColorId(boolean nightMode) {
|
public static int getDefaultIconColorId(boolean nightMode) {
|
||||||
return nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light;
|
return nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light;
|
||||||
|
|
|
@ -131,7 +131,11 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (countEnabled > 1) {
|
} else if (countEnabled > 1) {
|
||||||
LiveUpdatesUpdateAllBottomSheet.showInstance(fragmentManager, listener.currentFragment());
|
Fragment target = null;
|
||||||
|
if (listener instanceof Fragment) {
|
||||||
|
target = (Fragment) listener;
|
||||||
|
}
|
||||||
|
LiveUpdatesUpdateAllBottomSheet.showInstance(fragmentManager, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -650,11 +654,6 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL
|
||||||
return getMapsToUpdate(adapter.mapsList, settings);
|
return getMapsToUpdate(adapter.mapsList, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Fragment currentFragment() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onUpdateLocalIndex(String fileName, boolean newValue, final Runnable callback) {
|
public boolean onUpdateLocalIndex(String fileName, boolean newValue, final Runnable callback) {
|
||||||
int frequencyId = preferenceUpdateFrequency(fileName, settings).get();
|
int frequencyId = preferenceUpdateFrequency(fileName, settings).get();
|
||||||
|
|
|
@ -278,7 +278,5 @@ public class LiveUpdatesHelper {
|
||||||
void processFinish();
|
void processFinish();
|
||||||
|
|
||||||
List<LocalIndexInfo> getMapsToUpdate();
|
List<LocalIndexInfo> getMapsToUpdate();
|
||||||
|
|
||||||
Fragment currentFragment();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue