Nip13 pow (#357)

* add pow

* animation

* matrix style

* animation better

* improve animation

* improve animation

* works

* fix jump

* difficulty indicator

* 10 is default

* animation runs forever

* pow in message timestamp

* pow works

* default on

* adjust animation

* no printing
This commit is contained in:
callebtc
2025-08-31 13:23:22 +02:00
committed by GitHub
parent 5b62118336
commit b62b15a21f
13 changed files with 1182 additions and 108 deletions
@@ -42,6 +42,7 @@ import com.bitchat.android.ui.ChatViewModel
import com.bitchat.android.ui.theme.BitchatTheme
import com.bitchat.android.ui.theme.ThemePreference
import com.bitchat.android.ui.theme.ThemePreferenceManager
import com.bitchat.android.nostr.PoWPreferenceManager
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
@@ -591,6 +592,10 @@ class MainActivity : ComponentActivity() {
Log.d("MainActivity", "Permissions verified, initializing chat system")
// Initialize PoW preferences early in the initialization process
PoWPreferenceManager.init(this@MainActivity)
Log.d("MainActivity", "PoW preferences initialized")
// Ensure all permissions are still granted (user might have revoked in settings)
if (!permissionManager.areAllPermissionsGranted()) {
val missing = permissionManager.getMissingPermissions()