Skip to content

Commit 58ef5cf

Browse files
committed
fixed navigation right bar items spacing issue in map screen
1 parent ed0f001 commit 58ef5cf

File tree

1 file changed

+40
-39
lines changed

1 file changed

+40
-39
lines changed

GoInfoGame/GoInfoGame/UI/Map/MapView.swift

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -260,47 +260,48 @@ struct MapView: View {
260260
}
261261

262262
ToolbarItem(placement: .navigationBarTrailing) {
263-
QuestSyncButton(badgeCount: viewModel.syncFailedElementsCount, isSyncing: isSyncing, action: {
264-
debugPrint("Sync taped")
265-
guard viewModel.syncFailedElementsCount > 0 else {
266-
alertIcon = "info.bubble"
267-
alertMessage = "No elements to sync"
268-
showAlert = true
269-
return
263+
HStack(spacing: 5.0) {
264+
QuestSyncButton(badgeCount: viewModel.syncFailedElementsCount, isSyncing: isSyncing, action: {
265+
debugPrint("Sync taped")
266+
guard viewModel.syncFailedElementsCount > 0 else {
267+
alertIcon = "info.bubble"
268+
alertMessage = "No elements to sync"
269+
showAlert = true
270+
return
271+
}
272+
isSyncing = true
273+
DatasyncManager.shared.syncDataToOSM(exclude_gig_tags: false) { _ in
274+
isSyncing = false
275+
viewModel.checkSyncStatus()
276+
}
277+
})
278+
279+
Button(action: {
280+
debugPrint("satellite icon tapped")
281+
viewModel.updateOptions(for: mapViewRef?.region.center ?? CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0))
282+
viewModel.showSatellitePicker = true
283+
}) {
284+
Image(systemName: "square.2.layers.3d.bottom.filled")
285+
.resizable()
286+
.padding(8)
287+
.foregroundStyle(Asset.Colors.huskyPurple.swiftUIColor)
288+
.background(Asset.Colors.e7E3EELightPurpuleBg.swiftUIColor)
289+
.frame(width: 34, height: 34)
290+
.clipShape(Circle())
270291
}
271-
isSyncing = true
272-
DatasyncManager.shared.syncDataToOSM(exclude_gig_tags: false) { _ in
273-
isSyncing = false
274-
viewModel.checkSyncStatus()
292+
293+
Button(action: {
294+
print("Settings icon tapped")
295+
showUserSettingsSheet = true
296+
}) {
297+
Image(systemName: "gear")
298+
.resizable()
299+
.padding(8)
300+
.foregroundStyle(Asset.Colors.huskyPurple.swiftUIColor)
301+
.background(Asset.Colors.e7E3EELightPurpuleBg.swiftUIColor)
302+
.frame(width: 34, height: 34)
303+
.clipShape(Circle())
275304
}
276-
})
277-
}
278-
279-
ToolbarItem(placement: .navigationBarTrailing) {
280-
Button(action: {
281-
debugPrint("satellite icon tapped")
282-
viewModel.updateOptions(for: mapViewRef?.region.center ?? CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0))
283-
viewModel.showSatellitePicker = true
284-
}) {
285-
Image(systemName: "square.2.layers.3d.bottom.filled")
286-
.padding(8)
287-
.foregroundStyle(Asset.Colors.huskyPurple.swiftUIColor)
288-
.background(Asset.Colors.e7E3EELightPurpuleBg.swiftUIColor)
289-
.frame(width: 34, height: 34)
290-
.clipShape(Circle())
291-
}
292-
}
293-
ToolbarItem(placement: .navigationBarTrailing) {
294-
Button(action: {
295-
print("Settings icon tapped")
296-
showUserSettingsSheet = true
297-
}) {
298-
Image(systemName: "gear")
299-
.padding(8)
300-
.foregroundStyle(Asset.Colors.huskyPurple.swiftUIColor)
301-
.background(Asset.Colors.e7E3EELightPurpuleBg.swiftUIColor)
302-
.frame(width: 34, height: 34)
303-
.clipShape(Circle())
304305
}
305306
}
306307
}

0 commit comments

Comments
 (0)