feat: Remove debug logging from message sending and user blocking/unblocking functions

This commit is contained in:
k1ngsterr1
2026-01-14 03:44:29 +05:00
parent 671b68103f
commit e9dece8e86
7 changed files with 3 additions and 255 deletions

View File

@@ -41,19 +41,15 @@ class AccountManager(private val context: Context) {
// Synchronous read from SharedPreferences - always up to date
fun getLastLoggedPublicKey(): String? {
val publicKey = sharedPrefs.getString(KEY_LAST_LOGGED, null)
android.util.Log.d("AccountManager", "📖 getLastLoggedPublicKey: ${publicKey?.take(16) ?: "null"}")
return publicKey
}
// Synchronous write to SharedPreferences
fun setLastLoggedPublicKey(publicKey: String) {
android.util.Log.d("AccountManager", "💾 Saving last logged account: ${publicKey.take(16)}...")
val success = sharedPrefs.edit().putString(KEY_LAST_LOGGED, publicKey).commit() // commit() is synchronous
android.util.Log.d("AccountManager", "💾 Save result: $success")
// Verify immediately
val saved = sharedPrefs.getString(KEY_LAST_LOGGED, null)
android.util.Log.d("AccountManager", "💾 Verification read: ${saved?.take(16) ?: "null"}")
}
suspend fun saveAccount(account: EncryptedAccount) {
@@ -86,7 +82,6 @@ class AccountManager(private val context: Context) {
}
suspend fun setCurrentAccount(publicKey: String) {
android.util.Log.d("AccountManager", "🔐 setCurrentAccount called for: ${publicKey.take(16)}...")
// ⚡ ВАЖНО: Сначала сохраняем в SharedPreferences синхронно
setLastLoggedPublicKey(publicKey)
@@ -97,7 +92,6 @@ class AccountManager(private val context: Context) {
preferences[IS_LOGGED_IN] = true
}
android.util.Log.d("AccountManager", "✅ setCurrentAccount completed for: ${publicKey.take(16)}...")
}
suspend fun logout() {