mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-09 21:19:58 +02:00
Adds logs to Init functions of classes to keep a close eye on.
This commit is contained in:
@ -1233,6 +1233,7 @@ class Account(
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "Account")
|
||||||
backupContactList?.let {
|
backupContactList?.let {
|
||||||
println("Loading saved contacts ${it.toJson()}")
|
println("Loading saved contacts ${it.toJson()}")
|
||||||
if (userProfile().latestContactList == null) {
|
if (userProfile().latestContactList == null) {
|
||||||
|
@ -70,6 +70,7 @@ abstract class NostrDataSource(val debugName: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "${this.javaClass.simpleName} Subscribe")
|
||||||
Client.subscribe(clientListener)
|
Client.subscribe(clientListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
package com.vitorpamplona.amethyst.service.tts
|
package com.vitorpamplona.amethyst.service.tts
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.LifecycleEventObserver
|
import androidx.lifecycle.LifecycleEventObserver
|
||||||
import androidx.lifecycle.LifecycleOwner
|
import androidx.lifecycle.LifecycleOwner
|
||||||
@ -33,6 +34,7 @@ class TextToSpeechHelper private constructor(private val context: WeakReference<
|
|||||||
private var customActionForDestroy: (() -> Unit)? = null
|
private var customActionForDestroy: (() -> Unit)? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "Init TTS")
|
||||||
initTTS()
|
initTTS()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,6 +425,7 @@ class FollowListViewModel(val account: Account) : ViewModel() {
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "App Top Bar")
|
||||||
refresh()
|
refresh()
|
||||||
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
LocalCache.live.newEventBundles.collect { newNotes ->
|
LocalCache.live.newEventBundles.collect { newNotes ->
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.note
|
package com.vitorpamplona.amethyst.ui.note
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
@ -293,6 +294,7 @@ class UserReactionsViewModel(val account: Account) : ViewModel() {
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "User Reactions Row")
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
initializeSuspend()
|
initializeSuspend()
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.screen
|
package com.vitorpamplona.amethyst.ui.screen
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import com.vitorpamplona.amethyst.LocalPreferences
|
import com.vitorpamplona.amethyst.LocalPreferences
|
||||||
@ -29,6 +30,7 @@ class AccountStateViewModel(val context: Context) : ViewModel() {
|
|||||||
val accountContent = _accountContent.asStateFlow()
|
val accountContent = _accountContent.asStateFlow()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "AccountStateViewModel")
|
||||||
// pulls account from storage.
|
// pulls account from storage.
|
||||||
|
|
||||||
// Keeps it in the the UI thread to void blinking the login page.
|
// Keeps it in the the UI thread to void blinking the login page.
|
||||||
|
@ -329,6 +329,7 @@ open class CardFeedViewModel(val localFilter: FeedFilter<Note>) : ViewModel() {
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "${this.javaClass.simpleName}")
|
||||||
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
LocalCache.live.newEventBundles.collect { newNotes ->
|
LocalCache.live.newEventBundles.collect { newNotes ->
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.screen
|
package com.vitorpamplona.amethyst.ui.screen
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
@ -257,6 +258,7 @@ abstract class FeedViewModel(val localFilter: FeedFilter<Note>) : ViewModel(), I
|
|||||||
private var collectorJob: Job? = null
|
private var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "${this.javaClass.simpleName}")
|
||||||
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
LocalCache.live.newEventBundles.collect { newNotes ->
|
LocalCache.live.newEventBundles.collect { newNotes ->
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.screen
|
package com.vitorpamplona.amethyst.ui.screen
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
@ -84,6 +85,7 @@ open class LnZapFeedViewModel(val dataSource: FeedFilter<ZapReqResponse>) : View
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "${this.javaClass.simpleName}")
|
||||||
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.screen
|
package com.vitorpamplona.amethyst.ui.screen
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
@ -104,6 +105,7 @@ open class UserFeedViewModel(val dataSource: FeedFilter<User>) : ViewModel(), In
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Log.d("Init", "${this.javaClass.simpleName}")
|
||||||
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
collectorJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user