feat(mobile): include partner's photos on map (#8553)

* add option for showing partner images on the map

* renaming of iswithPartners variable
This commit is contained in:
Stefan H 2024-04-06 16:04:40 +02:00 committed by GitHub
parent a2e38270e4
commit ab97f03cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 40 additions and 2 deletions

View file

@ -30,6 +30,8 @@ class MapStateNotifier extends _$MapStateNotifier {
.getSetting<bool>(AppSettingsEnum.mapShowFavoriteOnly),
includeArchived: appSettingsProvider
.getSetting<bool>(AppSettingsEnum.mapIncludeArchived),
withPartners: appSettingsProvider
.getSetting<bool>(AppSettingsEnum.mapwithPartners),
relativeTime:
appSettingsProvider.getSetting<int>(AppSettingsEnum.mapRelativeDate),
);
@ -114,6 +116,7 @@ class MapStateNotifier extends _$MapStateNotifier {
state = state.copyWith(shouldRefetchMarkers: shouldRefetch);
}
void switchIncludeArchived(bool isIncludeArchived) {
ref.read(appSettingsServiceProvider).setSetting(
AppSettingsEnum.mapIncludeArchived,
@ -125,6 +128,17 @@ class MapStateNotifier extends _$MapStateNotifier {
);
}
void switchWithPartners(bool isWithPartners) {
ref.read(appSettingsServiceProvider).setSetting(
AppSettingsEnum.mapwithPartners,
isWithPartners,
);
state = state.copyWith(
withPartners: isWithPartners,
shouldRefetchMarkers: true,
);
}
void setRelativeTime(int relativeTime) {
ref.read(appSettingsServiceProvider).setSetting(
AppSettingsEnum.mapRelativeDate,