File tree Expand file tree Collapse file tree
data/src/main/java/com/threegap/bitnagil/data/address/repositoryImpl
domain/src/main/java/com/threegap/bitnagil/domain/address Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ class AddressRepositoryImpl @Inject constructor(
1616 return locationDataSource.fetchCurrentLocation()
1717 }
1818
19- override suspend fun fetchCurrentAddress (latitude : Double , longitude : Double ): Result <String > {
20- return addressDataSource.fetchCurrentAddress(latitude, longitude)
19+ override suspend fun fetchCurrentAddress (longitude : Double , latitude : Double ): Result <String > {
20+ return addressDataSource.fetchCurrentAddress(longitude = longitude, latitude = latitude )
2121 .mapCatching {
2222 it.toAddress() ? : throw Exception (" Address not found" )
2323 }
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import com.threegap.bitnagil.domain.address.model.CurrentLocation
44
55interface AddressRepository {
66 suspend fun fetchCurrentLocation (): Result <CurrentLocation >
7- suspend fun fetchCurrentAddress (latitude : Double , longitude : Double ): Result <String >
7+ suspend fun fetchCurrentAddress (longitude : Double , latitude : Double ): Result <String >
88}
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ class FetchCurrentAddressUseCase @Inject constructor(
1111 return addressRepository.fetchCurrentLocation()
1212 .mapCatching { location ->
1313 val roadAddress = addressRepository.fetchCurrentAddress(
14- latitude = location.latitude,
1514 longitude = location.longitude,
15+ latitude = location.latitude,
1616 ).getOrThrow()
1717
1818 CurrentAddress (
You can’t perform that action at this time.
0 commit comments