File tree Expand file tree Collapse file tree 2 files changed +24
-27
lines changed
presentation/src/main/java/com/stop/ui Expand file tree Collapse file tree 2 files changed +24
-27
lines changed Original file line number Diff line number Diff line change @@ -258,24 +258,22 @@ class MapFragment : Fragment() {
258
258
}
259
259
260
260
private fun observeClickCurrentLocation () {
261
- viewLifecycleOwner.lifecycleScope.launch {
262
- launch {
263
- placeSearchViewModel.clickCurrentLocation
264
- .flowWithLifecycle(viewLifecycleOwner.lifecycle)
265
- .collect {
266
- val currentLocation = placeSearchViewModel.currentLocation
267
- val currentTmapPoint = TMapPoint (currentLocation.latitude, currentLocation.longitude)
268
-
269
- tMapView.setCenterPoint(currentTmapPoint.latitude, currentTmapPoint.longitude)
270
-
271
- setPanel(currentTmapPoint)
272
-
273
- makeMarker(
274
- R .drawable.ic_baseline_location_on_32,
275
- currentTmapPoint
276
- )
277
- }
278
- }
261
+ lifecycleScope.launch {
262
+ placeSearchViewModel.clickCurrentLocation
263
+ .flowWithLifecycle(viewLifecycleOwner.lifecycle)
264
+ .collect {
265
+ val currentLocation = placeSearchViewModel.currentLocation
266
+ val currentTmapPoint = TMapPoint (currentLocation.latitude, currentLocation.longitude)
267
+
268
+ tMapView.setCenterPoint(currentTmapPoint.latitude, currentTmapPoint.longitude)
269
+
270
+ setPanel(currentTmapPoint)
271
+
272
+ makeMarker(
273
+ R .drawable.ic_baseline_location_on_32,
274
+ currentTmapPoint
275
+ )
276
+ }
279
277
}
280
278
}
281
279
Original file line number Diff line number Diff line change @@ -106,16 +106,15 @@ class PlaceSearchFragment : Fragment() {
106
106
}
107
107
108
108
private fun logErrorMessage () {
109
- viewLifecycleOwner.lifecycleScope.launch {
110
- launch {
111
- placeSearchViewModel.errorMessage
112
- .flowWithLifecycle(viewLifecycleOwner.lifecycle)
113
- .collect {
114
- if (it.isNotBlank()) {
115
- Log .e(PLACE_SEARCH_FRAGMENT , it)
116
- }
109
+ lifecycleScope.launch {
110
+
111
+ placeSearchViewModel.errorMessage
112
+ .flowWithLifecycle(viewLifecycleOwner.lifecycle)
113
+ .collect {
114
+ if (it.isNotBlank()) {
115
+ Log .e(PLACE_SEARCH_FRAGMENT , it)
117
116
}
118
- }
117
+ }
119
118
}
120
119
}
121
120
You can’t perform that action at this time.
0 commit comments