Skip to content

Commit 77ab267

Browse files
committed
refactor: updated for release
1 parent da2511b commit 77ab267

File tree

23 files changed

+258
-165
lines changed

23 files changed

+258
-165
lines changed

core/common/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ dependencies {
1616
implementation(libs.firebase.bom)
1717
implementation(libs.firebase.crashlytics)
1818
implementation(libs.androidx.compose.material3)
19-
}
19+
}

core/common/src/main/kotlin/com/espressodev/gptmap/core/common/GmViewModel.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ open class GmViewModel(private val logService: LogService) : ViewModel() {
1414
fun launchCatching(snackbar: Boolean = true, block: suspend CoroutineScope.() -> Unit) =
1515
viewModelScope.launch(
1616
CoroutineExceptionHandler { _, throwable ->
17-
if (snackbar) {
18-
SnackbarManager.showMessage(throwable.toSnackbarMessage())
19-
}
17+
// It's only for debug purposes
18+
// if (snackbar) {
19+
// SnackbarManager.showMessage(throwable.toSnackbarMessage())
20+
// }
2021
logService.logNonFatalCrash(throwable)
21-
Log.e("GmViewModel", "launchCatching: ", throwable)
22+
// Log.e("GmViewModel", "launchCatching: ", throwable)
2223
},
2324
block = block,
2425
)
25-
}
26+
}

core/common/src/main/kotlin/com/espressodev/gptmap/core/common/network_monitor/ConnectivityManagerNetworkMonitor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ConnectivityManagerNetworkMonitor @Inject constructor(
1919
override val isOnline: Flow<Boolean> = callbackFlow {
2020
val connectivityManager = context.getSystemService<ConnectivityManager>()
2121
if (connectivityManager == null) {
22-
channel.trySend(false)
22+
channel.trySend(element = false)
2323
channel.close()
2424
return@callbackFlow
2525
}
@@ -29,7 +29,7 @@ class ConnectivityManagerNetworkMonitor @Inject constructor(
2929

3030
override fun onAvailable(network: Network) {
3131
networks += network
32-
channel.trySend(true)
32+
channel.trySend(element = true)
3333
}
3434

3535
override fun onLost(network: Network) {
@@ -56,5 +56,5 @@ class ConnectivityManagerNetworkMonitor @Inject constructor(
5656

5757
private fun ConnectivityManager.isCurrentlyConnected() = activeNetwork
5858
?.let(::getNetworkCapabilities)
59-
?.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) ?: false
59+
?.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) == true
6060
}

core/common/src/main/kotlin/com/espressodev/gptmap/core/common/network_monitor/NetworkMonitor.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ interface NetworkMonitor {
1313
@Module
1414
@InstallIn(ActivityComponent::class)
1515
abstract class NetworkModule {
16-
1716
@Binds
1817
abstract fun bindsNetworkMonitor(networkMonitor: ConnectivityManagerNetworkMonitor): NetworkMonitor
19-
}
18+
}

core/common/src/main/kotlin/com/espressodev/gptmap/core/common/snackbar/SnackbarManager.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ object SnackbarManager {
2121
fun showMessage(message: SnackbarMessage) {
2222
messages.update { message }
2323
}
24-
2524
fun clean() {
2625
messages.update { null }
2726
}
28-
}
27+
}

core/common/src/main/kotlin/com/espressodev/gptmap/core/common/snackbar/SnackbarMessage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ sealed class SnackbarMessage {
2222
else ResourceSnackbar(AppText.generic_error)
2323
}
2424
}
25-
}
25+
}

core/data/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ dependencies {
1313
implementation(libs.firebase.firestore)
1414
implementation(libs.firebase.auth)
1515
implementation(libs.firebase.crashlytics)
16-
}
16+
}

core/designsystem/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ dependencies {
2020
implementation(libs.lottie.compose)
2121
implementation(libs.kotlinx.collections.immutable)
2222
implementation(libs.coil.compose)
23-
}
23+
}

core/designsystem/src/main/kotlin/com/espressodev/gptmap/core/designsystem/Constants.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@ object Constants {
66
val SMALL_PADDING = 4.dp
77
val MEDIUM_PADDING = 8.dp
88
val HIGH_PADDING = 16.dp
9-
val VERY_HIGH_PADDING = 24.dp
10-
val MAX_PADDING = 32.dp
11-
val BIG_BUTTON_SIZE = 64.dp
129

1310
// User Agreements
1411
const val PRIVACY_POLICY_DESC = "By signing up, you agree to accept our privacy policy and terms & conditions."
1512
const val PRIVACY_TERM_CONDITIONS = "Privacy Policy and Terms & Conditions"
1613
const val PRIVACY_POLICY = "Privacy Policy"
17-
const val PRIVACY_POLICY_LINK = "https://sites.google.com/view/smile-privacy-policy/home"
14+
const val PRIVACY_POLICY_LINK = "https://sites.google.com/view/gptmap-privacy-policy"
1815
const val TERMS_CONDITIONS = "Terms & Conditions"
19-
const val TERMS_CONDITIONS_LINK = "https://sites.google.com/view/smile-terms-conditions/home"
16+
const val TERMS_CONDITIONS_LINK = "https://sites.google.com/view/gptmap-terms-conditions"
2017
const val GITHUB_DESC = "Check out this open source project on GitHub by clicking here."
21-
const val GITHUB_LINK = "https://github.com/f-arslan/smile"
18+
const val GITHUB_LINK = "https://github.com/f-arslan/gptmap"
2219
}

core/designsystem/src/main/kotlin/com/espressodev/gptmap/core/designsystem/GmIcons.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.espressodev.gptmap.core.designsystem
33
import androidx.compose.material.icons.Icons
44
import androidx.compose.material.icons.filled.Bookmark
55
import androidx.compose.material.icons.filled.Camera
6-
import androidx.compose.material.icons.filled.CheckCircle
76
import androidx.compose.material.icons.filled.Clear
87
import androidx.compose.material.icons.filled.Done
98
import androidx.compose.material.icons.filled.Edit
@@ -16,7 +15,6 @@ import androidx.compose.material.icons.filled.Search
1615
import androidx.compose.material.icons.filled.Title
1716
import androidx.compose.material.icons.outlined.AccountCircle
1817
import androidx.compose.material.icons.outlined.ArrowBack
19-
import androidx.compose.material.icons.outlined.Bookmark
2018
import androidx.compose.material.icons.outlined.BookmarkBorder
2119
import androidx.compose.material.icons.outlined.Cancel
2220
import androidx.compose.material.icons.outlined.Delete

0 commit comments

Comments
 (0)