mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-11 06:44:18 +00:00
Compare commits
2 Commits
jb_dlt_lis
...
jb_oph_htm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec4428377e | ||
|
|
c1137bd38a |
@@ -304,8 +304,8 @@ android {
|
||||
"ru",
|
||||
"sl",
|
||||
"sk",
|
||||
"sr-rCyrl",
|
||||
"sr-rLatn",
|
||||
"sr",
|
||||
"b+sr+Latn",
|
||||
"sv",
|
||||
"sw",
|
||||
"ta",
|
||||
|
||||
@@ -197,8 +197,10 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
||||
() -> onShareActionSelected(mSelectedCategory, KmlFileType.Text)));
|
||||
items.add(new MenuBottomSheetItem(R.string.export_file_gpx, R.drawable.ic_file_gpx,
|
||||
() -> onShareActionSelected(mSelectedCategory, KmlFileType.Gpx)));
|
||||
items.add(new MenuBottomSheetItem(R.string.delete, R.drawable.ic_delete,
|
||||
() -> onDeleteActionSelected(mSelectedCategory)));
|
||||
// Disallow deleting the last category
|
||||
if (getAdapter().getBookmarkCategories().size() > 1)
|
||||
items.add(new MenuBottomSheetItem(R.string.delete, R.drawable.ic_delete,
|
||||
() -> onDeleteActionSelected(mSelectedCategory)));
|
||||
}
|
||||
return items;
|
||||
}
|
||||
@@ -295,24 +297,8 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
||||
|
||||
private void onDeleteActionSelected(@NonNull BookmarkCategory category)
|
||||
{
|
||||
// Disallow deleting the last category
|
||||
if ((getAdapter().getBookmarkCategories().size() > 1))
|
||||
{
|
||||
BookmarkManager.INSTANCE.deleteCategory(category.getId());
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
.setMessage(R.string.unable_to_delete_list)
|
||||
.setPositiveButton(android.R.string.yes, ((dialog, which) -> {
|
||||
onAddButtonClick();
|
||||
BookmarkManager.INSTANCE.deleteCategory(category.getId());
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}))
|
||||
.setNegativeButton(android.R.string.no,(dialog, which) -> dialog.dismiss())
|
||||
.show();
|
||||
}
|
||||
BookmarkManager.INSTANCE.deleteCategory(category.getId());
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private void onSettingsActionSelected(@NonNull BookmarkCategory category)
|
||||
|
||||
@@ -975,5 +975,4 @@
|
||||
<string name="download_resources_custom_url_message">Override the default map download server used for map downloads. Leave empty to use CoMaps default server.</string>
|
||||
<string name="download_resources_custom_url_summary_none">Not set</string>
|
||||
<string name="download_resources_custom_url_error_scheme">Please enter a URL starting with http:// or https://</string>
|
||||
<string name="unable_to_delete_list">The app cannot work without at least one list. Do you want to remove it and create a new one?</string>
|
||||
</resources>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<locale android:name="ru" />
|
||||
<locale android:name="sl" />
|
||||
<locale android:name="sk" />
|
||||
<locale android:name="sr-Cyrl" />
|
||||
<locale android:name="sr" />
|
||||
<locale android:name="sr-Latn" />
|
||||
<locale android:name="sv" />
|
||||
<locale android:name="sw" />
|
||||
|
||||
@@ -11,6 +11,31 @@
|
||||
.example {
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
|
||||
/* Dark mode support. */
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
--primary-color: black;
|
||||
--secondary-color: #555555;
|
||||
--link-color: #37653F;
|
||||
--background-color: white;
|
||||
--separator-color: #0e0e0e;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary-color: #b5b5b5;
|
||||
--secondary-color: #858585;
|
||||
--link-color: #659464;
|
||||
--background-color: black;
|
||||
--separator-color: #0a0a0a;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
color: var(--secondary-color);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user