Skip to content

Commit c25b8a4

Browse files
committed
Don't send heartbeats if the user is not logged in
1 parent ef7f917 commit c25b8a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android/app/src/main/java/com/httpsms/Settings.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object Settings {
2727
.getString(this.SETTINGS_SIM1_PHONE_NUMBER, null)
2828

2929
if (owner == null) {
30-
Timber.e("cannot get owner from preference [${this.SETTINGS_SIM1_PHONE_NUMBER}]")
30+
Timber.i("cannot get owner from preference [${this.SETTINGS_SIM1_PHONE_NUMBER}]")
3131
return ""
3232
}
3333

@@ -43,7 +43,7 @@ object Settings {
4343
.getString(this.SETTINGS_SIM2_PHONE_NUMBER, null)
4444

4545
if (owner == null) {
46-
Timber.d("cannot get owner from preference [${this.SETTINGS_SIM2_PHONE_NUMBER}]")
46+
Timber.i("cannot get owner from preference [${this.SETTINGS_SIM2_PHONE_NUMBER}]")
4747
return ""
4848
}
4949

@@ -158,7 +158,7 @@ object Settings {
158158
}
159159

160160
fun isLoggedIn(context: Context): Boolean {
161-
return getApiKey(context) != null
161+
return getApiKey(context) != null && hasOwner(context)
162162
}
163163

164164
fun isDualSIM(context: Context): Boolean {

0 commit comments

Comments
 (0)