Skip to content

Commit a0dfb3c

Browse files
Merge pull request #148 from PopPool/feat/#139-map-auto-focus-admin-fix-page
ํ’€์Šคํฌ๋ฆฐ๋งต๋ทฐ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ œ๊ฑฐ์™€ ์–ด๋“œ๋ฏผํŽ˜์ด์ง€ ์ˆ˜์ •ํ™”๋ฉด ์ •์ƒํ™”
2 parents bb3d306 + cc4e502 commit a0dfb3c

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

โ€ŽPoppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminViewController.swiftโ€Ž

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,26 +176,17 @@ final class AdminViewController: BaseViewController, View {
176176
adminUseCase.fetchStoreDetail(id: store.id)
177177
.observe(on: MainScheduler.instance)
178178
.subscribe(
179-
onNext: { [weak self] storeDetail in
179+
onNext: { [weak self] _ in
180180
guard let self = self else { return }
181-
let updateParams = UpdateStoreParams(
182-
id: storeDetail.id,
183-
name: storeDetail.name,
184-
categoryId: storeDetail.categoryId,
185-
desc: storeDetail.description,
186-
address: storeDetail.address,
187-
startDate: storeDetail.startDate,
188-
endDate: storeDetail.endDate,
189-
mainImageUrl: storeDetail.mainImageUrl,
190-
imageUrlList: storeDetail.images.map { $0.imageUrl },
191-
imagesToDelete: [],
192-
latitude: storeDetail.latitude,
193-
longitude: storeDetail.longitude,
194-
markerTitle: storeDetail.markerTitle,
195-
markerSnippet: storeDetail.markerSnippet,
196-
startDateBeforeEndDate: true
181+
let registerVC = PopUpStoreRegisterViewController(
182+
nickname: self.nickname,
183+
editingStore: store
197184
)
198-
let registerVC = PopUpStoreRegisterViewController(nickname: self.nickname)
185+
186+
registerVC.completionHandler = { [weak self] in
187+
self?.reactor?.action.onNext(.reloadData)
188+
}
189+
199190
self.navigationController?.pushViewController(registerVC, animated: true)
200191
},
201192
onError: { [weak self] error in
@@ -206,7 +197,6 @@ final class AdminViewController: BaseViewController, View {
206197
}
207198

208199
private func deleteStore(_ store: AdminStore) {
209-
// ๋จผ์ € ์Šคํ† ์–ด ์ƒ์„ธ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์™€ ๋ชจ๋“  ์ด๋ฏธ์ง€ URL์„ ํ™•์ธ
210200
adminUseCase.fetchStoreDetail(id: store.id)
211201
.observe(on: MainScheduler.instance)
212202
.subscribe(

โ€ŽPoppool/PresentationLayer/Presentation/Presentation/Scene/Map/FindMap/MapGuideView/FullScreenMapViewController.swiftโ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class FullScreenMapViewController: MapViewController {
106106
let position = NMGLatLng(lat: store.latitude, lng: store.longitude)
107107

108108
let cameraUpdate = NMFCameraUpdate(scrollTo: position, zoomTo: 15.0)
109-
cameraUpdate.animation = .easeIn
110-
cameraUpdate.animationDuration = 0.3
109+
mainView.mapView.cancelTransitions()
110+
cameraUpdate.animation = .none
111111
mainView.mapView.moveCamera(cameraUpdate)
112112

113113
if let existingMarker = initialMarker {
@@ -210,8 +210,8 @@ class FullScreenMapViewController: MapViewController {
210210
mainView.setStoreCardHidden(false, animated: true)
211211

212212
let cameraUpdate = NMFCameraUpdate(scrollTo: marker.position, zoomTo: 15.0)
213-
cameraUpdate.animation = .easeIn
214-
cameraUpdate.animationDuration = 0.3
213+
mainView.mapView.cancelTransitions()
214+
cameraUpdate.animation = .none
215215
mainView.mapView.moveCamera(cameraUpdate)
216216

217217
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in

0 commit comments

Comments
ย (0)