Skip to content

Commit be4590d

Browse files
committed
Added alert saying No elements to sync
1 parent 0b1281c commit be4590d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

GoInfoGame/GoInfoGame/UI/Map/MapView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ struct MapView: View {
226226
ToolbarItem(placement: .navigationBarTrailing) {
227227
QuestSyncButton(badgeCount: viewModel.syncFailedElementsCount, isSyncing: isSyncing, action: {
228228
debugPrint("Sync taped")
229+
guard viewModel.syncFailedElementsCount > 0 else {
230+
alertIcon = "info.bubble"
231+
alertMessage = "No elements to sync"
232+
showAlert = true
233+
return
234+
}
229235
isSyncing = true
230236
DatasyncManager.shared.syncDataToOSM(exclude_gig_tags: false) { _ in
231237
isSyncing = false

0 commit comments

Comments
 (0)