refactor: share the UI settings and toasts, add LocalDisplaySettings, call LocalCache directly

First steps of shrinking AccountViewModel (see the plan in the PR):

- UiSettings (the settings enums), UiSettingsFlow and UiSettingsState
  move to commonsUI (they carry Compose StringResource labels, so not the
  headless commons). The app's global uiState is unchanged.
- New LocalDisplaySettings (showProfilePictures, performance mode,
  autoPlayVideos, showUrlPreview, showImages, startVideoPlayback),
  collected from UiSettingsState by collectDisplaySettings() and provided
  by AmethystTheme, which also derives LocalAnimationsEnabled from it.
  UserAvatar's loadProfilePicture / loadRobohash / autoPlayGif default to
  it, so InnerUserPicture no longer reads them from the AccountViewModel
  and drops that parameter.
- ToastManager and the toast message types move to commonsUI. The dialogs
  that render them stay in the app.
- 128 accountViewModel.getNoteIfExists / checkGetOrCreate* / channel
  lookups in 59 files call LocalCache directly; the 13 AccountViewModel
  wrappers left without callers are deleted.
- Baseline profile entries follow the moved classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0168wY9t7i9NC5u3svyMxEz6
This commit is contained in:
Claude
2026-09-24 15:23:59 +00:00
parent 8482fa3409
commit 1f1b6dab80
103 changed files with 556 additions and 469 deletions
@@ -56,6 +56,7 @@ import com.halilibo.richtext.ui.material3.RichText
import com.halilibo.richtext.ui.resolveDefaults
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.error_dialog_button_ok
import com.vitorpamplona.amethyst.commons.resources.push_server_explainer
@@ -71,7 +72,6 @@ import com.vitorpamplona.amethyst.commons.ui.components.SpinnerSelectionDialog
import com.vitorpamplona.amethyst.commons.ui.components.TextSpinner
import com.vitorpamplona.amethyst.commons.ui.components.TitleExplainer
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.service.notifications.PushDistributorHandler
import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.SettingsBlockTile
import com.vitorpamplona.quartz.utils.Log
@@ -22282,7 +22282,7 @@ SPLcom/vitorpamplona/amethyst/AppModules;->getThumbnailDiskCache()Lcom/vitorpamp
SPLcom/vitorpamplona/amethyst/AppModules;->getTorManager()Lcom/vitorpamplona/amethyst/ui/tor/TorManager;
SPLcom/vitorpamplona/amethyst/AppModules;->getTorPrefs()Lcom/vitorpamplona/amethyst/model/preferences/TorSharedPreferences;
SPLcom/vitorpamplona/amethyst/AppModules;->getUiPrefs()Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;
SPLcom/vitorpamplona/amethyst/AppModules;->getUiState()Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/AppModules;->getUiState()Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/AppModules;->getVideoCache()Lcom/vitorpamplona/amethyst/service/playback/diskCache/VideoCache;
SPLcom/vitorpamplona/amethyst/AppModules;->httpUsageInterceptor$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Z
SPLcom/vitorpamplona/amethyst/AppModules;->httpUsageInterceptor$lambda$1(Lcom/vitorpamplona/amethyst/AppModules;)Z
@@ -22301,7 +22301,7 @@ SPLcom/vitorpamplona/amethyst/AppModules;->signerPermissionStore_delegate$lambda
SPLcom/vitorpamplona/amethyst/AppModules;->thumbnailDiskCache_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/service/images/ThumbnailDiskCache;
SPLcom/vitorpamplona/amethyst/AppModules;->torPrefs_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/model/preferences/TorSharedPreferences;
SPLcom/vitorpamplona/amethyst/AppModules;->uiPrefs_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;
SPLcom/vitorpamplona/amethyst/AppModules;->uiState_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/AppModules;->uiState_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/AppModules;->videoCache_delegate$lambda$0(Lcom/vitorpamplona/amethyst/AppModules;)Lcom/vitorpamplona/amethyst/service/playback/diskCache/VideoCache;
Lcom/vitorpamplona/amethyst/AppModules$$ExternalSyntheticLambda0;
SPLcom/vitorpamplona/amethyst/AppModules$$ExternalSyntheticLambda0;-><init>(Landroid/content/Context;)V
@@ -23107,12 +23107,12 @@ Lcom/vitorpamplona/amethyst/favorites/FavoriteAppsRegistryKt;
SPLcom/vitorpamplona/amethyst/favorites/FavoriteAppsRegistryKt;-><clinit>()V
SPLcom/vitorpamplona/amethyst/favorites/FavoriteAppsRegistryKt;->access$getFavoriteAppsDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;
SPLcom/vitorpamplona/amethyst/favorites/FavoriteAppsRegistryKt;->getFavoriteAppsDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;
Lcom/vitorpamplona/amethyst/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/model/AccentColorType;->$values()[Lcom/vitorpamplona/amethyst/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/model/AccentColorType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/AccentColorType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/model/AccentColorType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/model/AccentColorType;->values()[Lcom/vitorpamplona/amethyst/model/AccentColorType;
Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/commons/model/AccentColorType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/commons/model/AccentColorType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/AccentColorType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/commons/model/AccentColorType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/commons/model/AccentColorType;->values()[Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
Lcom/vitorpamplona/amethyst/model/Account;
Lcom/vitorpamplona/amethyst/model/AccountSettings;
Lcom/vitorpamplona/amethyst/model/AntiSpamFilter;
@@ -23121,44 +23121,44 @@ SPLcom/vitorpamplona/amethyst/model/AntiSpamFilter;-><init>()V
Lcom/vitorpamplona/amethyst/model/AntiSpamState;
SPLcom/vitorpamplona/amethyst/model/AntiSpamState;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/AntiSpamState;-><init>(Lcom/vitorpamplona/amethyst/model/AntiSpamFilter;)V
Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/BooleanType;->$values()[Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/BooleanType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/BooleanType;-><init>(Ljava/lang/String;ILjava/lang/Boolean;II)V
SPLcom/vitorpamplona/amethyst/model/BooleanType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/BooleanType;->values()[Lcom/vitorpamplona/amethyst/model/BooleanType;
Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/BooleanType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/BooleanType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/BooleanType;-><init>(Ljava/lang/String;ILjava/lang/Boolean;II)V
SPLcom/vitorpamplona/amethyst/commons/model/BooleanType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/BooleanType;->values()[Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
Lcom/vitorpamplona/amethyst/model/CachePruner;
SPLcom/vitorpamplona/amethyst/model/CachePruner;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/CachePruner;-><init>(Lcom/vitorpamplona/amethyst/model/LocalCache;)V
Lcom/vitorpamplona/amethyst/model/CacheSearch;
SPLcom/vitorpamplona/amethyst/model/CacheSearch;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/CacheSearch;-><init>(Lcom/vitorpamplona/amethyst/model/LocalCache;)V
Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/ConnectivityType;->$values()[Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/ConnectivityType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/ConnectivityType;-><init>(Ljava/lang/String;ILjava/lang/Boolean;II)V
SPLcom/vitorpamplona/amethyst/model/ConnectivityType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/ConnectivityType;->values()[Lcom/vitorpamplona/amethyst/model/ConnectivityType;
Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/ConnectivityType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/ConnectivityType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/ConnectivityType;-><init>(Ljava/lang/String;ILjava/lang/Boolean;II)V
SPLcom/vitorpamplona/amethyst/commons/model/ConnectivityType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/ConnectivityType;->values()[Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
Lcom/vitorpamplona/amethyst/model/Dao;
Lcom/vitorpamplona/amethyst/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/model/FeatureSetType;->$values()[Lcom/vitorpamplona/amethyst/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/model/FeatureSetType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/FeatureSetType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/model/FeatureSetType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/model/FeatureSetType;->values()[Lcom/vitorpamplona/amethyst/model/FeatureSetType;
Lcom/vitorpamplona/amethyst/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/model/FontFamilyType;->$values()[Lcom/vitorpamplona/amethyst/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/model/FontFamilyType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/FontFamilyType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/model/FontFamilyType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/model/FontFamilyType;->values()[Lcom/vitorpamplona/amethyst/model/FontFamilyType;
Lcom/vitorpamplona/amethyst/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/model/FontSizeType;->$values()[Lcom/vitorpamplona/amethyst/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/model/FontSizeType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/FontSizeType;-><init>(Ljava/lang/String;IFII)V
SPLcom/vitorpamplona/amethyst/model/FontSizeType;->getScale()F
SPLcom/vitorpamplona/amethyst/model/FontSizeType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/model/FontSizeType;->values()[Lcom/vitorpamplona/amethyst/model/FontSizeType;
Lcom/vitorpamplona/amethyst/commons/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;->values()[Lcom/vitorpamplona/amethyst/commons/model/FeatureSetType;
Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/commons/model/FontFamilyType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/commons/model/FontFamilyType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/FontFamilyType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/commons/model/FontFamilyType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/commons/model/FontFamilyType;->values()[Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;-><init>(Ljava/lang/String;IFII)V
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;->getScale()F
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/commons/model/FontSizeType;->values()[Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
Lcom/vitorpamplona/amethyst/model/ILocalCache;
Lcom/vitorpamplona/amethyst/model/LocalCache;
SPLcom/vitorpamplona/amethyst/model/LocalCache;-><clinit>()V
@@ -23187,119 +23187,119 @@ Lcom/vitorpamplona/amethyst/model/LocalCacheFlow;
SPLcom/vitorpamplona/amethyst/model/LocalCacheFlow;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/LocalCacheFlow;-><init>()V
SPLcom/vitorpamplona/amethyst/model/LocalCacheFlow;->getNewEventBundles()Lkotlinx/coroutines/flow/SharedFlow;
Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/model/ProfileGalleryType;->$values()[Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/model/ProfileGalleryType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/ProfileGalleryType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/model/ProfileGalleryType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/model/ProfileGalleryType;->values()[Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;
Lcom/vitorpamplona/amethyst/model/ThemeType;
SPLcom/vitorpamplona/amethyst/model/ThemeType;->$values()[Lcom/vitorpamplona/amethyst/model/ThemeType;
SPLcom/vitorpamplona/amethyst/model/ThemeType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/ThemeType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/model/ThemeType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/model/ThemeType;
SPLcom/vitorpamplona/amethyst/model/ThemeType;->values()[Lcom/vitorpamplona/amethyst/model/ThemeType;
Lcom/vitorpamplona/amethyst/model/UiSettings;
SPLcom/vitorpamplona/amethyst/model/UiSettings;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/UiSettings;-><init>(Lcom/vitorpamplona/amethyst/model/ThemeType;Ljava/lang/String;Lcom/vitorpamplona/amethyst/model/ConnectivityType;Lcom/vitorpamplona/amethyst/model/ConnectivityType;Lcom/vitorpamplona/amethyst/model/BooleanType;Lcom/vitorpamplona/amethyst/model/ConnectivityType;Lcom/vitorpamplona/amethyst/model/BooleanType;Lcom/vitorpamplona/amethyst/model/ConnectivityType;ZZLcom/vitorpamplona/amethyst/model/FeatureSetType;Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;Lcom/vitorpamplona/amethyst/model/BooleanType;Lcom/vitorpamplona/amethyst/model/BooleanType;Lcom/vitorpamplona/amethyst/model/BooleanType;ZZZZZZZZLcom/vitorpamplona/amethyst/model/BooleanType;Lcom/vitorpamplona/amethyst/model/AccentColorType;Lcom/vitorpamplona/amethyst/model/FontFamilyType;Lcom/vitorpamplona/amethyst/model/FontSizeType;Ljava/lang/String;Z)V
SPLcom/vitorpamplona/amethyst/model/UiSettings;->equals(Ljava/lang/Object;)Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAccentColor()Lcom/vitorpamplona/amethyst/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyCreateDrafts()Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyHideNavigationBars()Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyPlayVideos()Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyProposeAiImprovements()Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyShowImages()Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyShowProfilePictures()Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyShowUrlPreview()Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getAutomaticallyStartPlayback()Lcom/vitorpamplona/amethyst/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getComposeSignature()Ljava/lang/String;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getDontAskForNotificationPermissions()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getDontShowOnchainPublicWarning()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getDontShowPushNotificationSelector()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getFeatureSet()Lcom/vitorpamplona/amethyst/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getFontFamily()Lcom/vitorpamplona/amethyst/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getFontSize()Lcom/vitorpamplona/amethyst/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getGallerySet()Lcom/vitorpamplona/amethyst/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getPreferredLanguage()Ljava/lang/String;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowHomeConversationsTab()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowHomeEverythingTab()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowHomeNewThreadsTab()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowOnchainWallet()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowProfileAppRecommendations()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowProfileBadges()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowProfileFollowersFeed()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getShowProfileZapReceivedFeed()Z
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getSuggestWorkoutsFromHealthConnect()Lcom/vitorpamplona/amethyst/model/BooleanType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getTheme()Lcom/vitorpamplona/amethyst/model/ThemeType;
SPLcom/vitorpamplona/amethyst/model/UiSettings;->getUseTrackedBroadcasts()Lcom/vitorpamplona/amethyst/model/BooleanType;
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda0;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda0;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda1;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda1;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda10;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda10;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda11;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda11;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda12;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda12;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda13;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda13;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda14;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda14;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda15;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda15;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda2;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda2;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda3;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda3;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda4;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda4;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda5;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda5;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda6;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda6;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda7;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda7;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda8;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda8;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda9;
SPLcom/vitorpamplona/amethyst/model/UiSettings$$ExternalSyntheticLambda9;-><init>()V
Lcom/vitorpamplona/amethyst/model/UiSettings$Companion;
SPLcom/vitorpamplona/amethyst/model/UiSettings$Companion;-><init>()V
SPLcom/vitorpamplona/amethyst/model/UiSettings$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;-><init>(Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;)V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAccentColor()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAutomaticallyPlayVideos()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAutomaticallyShowImages()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAutomaticallyShowProfilePictures()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAutomaticallyShowUrlPreview()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getAutomaticallyStartPlayback()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getFontFamily()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getFontSize()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getPreferredLanguage()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getPropertyWatchFlow()Lkotlinx/coroutines/flow/Flow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->getTheme()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow;->toSettings()Lcom/vitorpamplona/amethyst/model/UiSettings;
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$Companion;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$Companion;-><init>()V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$Companion;->build(Lcom/vitorpamplona/amethyst/model/UiSettings;)Lcom/vitorpamplona/amethyst/model/UiSettingsFlow;
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1;-><init>([Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$1;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$1;-><init>(Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$2;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$2;-><init>([Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$2;->invoke()Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$2;->invoke()[Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$3;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$3;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$3;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$3;->invoke(Lkotlinx/coroutines/flow/FlowCollector;[Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/UiSettingsFlow$special$$inlined$combine$1$3;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;->values()[Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;
Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
SPLcom/vitorpamplona/amethyst/commons/model/ThemeType;->$values()[Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
SPLcom/vitorpamplona/amethyst/commons/model/ThemeType;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/ThemeType;-><init>(Ljava/lang/String;III)V
SPLcom/vitorpamplona/amethyst/commons/model/ThemeType;->valueOf(Ljava/lang/String;)Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
SPLcom/vitorpamplona/amethyst/commons/model/ThemeType;->values()[Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
Lcom/vitorpamplona/amethyst/commons/model/UiSettings;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;-><init>(Lcom/vitorpamplona/amethyst/commons/model/ThemeType;Ljava/lang/String;Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;Lcom/vitorpamplona/amethyst/commons/model/BooleanType;Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;Lcom/vitorpamplona/amethyst/commons/model/BooleanType;Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;ZZLcom/vitorpamplona/amethyst/commons/model/FeatureSetType;Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;Lcom/vitorpamplona/amethyst/commons/model/BooleanType;Lcom/vitorpamplona/amethyst/commons/model/BooleanType;Lcom/vitorpamplona/amethyst/commons/model/BooleanType;ZZZZZZZZLcom/vitorpamplona/amethyst/commons/model/BooleanType;Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;Ljava/lang/String;Z)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->equals(Ljava/lang/Object;)Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAccentColor()Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyCreateDrafts()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyHideNavigationBars()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyPlayVideos()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyProposeAiImprovements()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyShowImages()Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyShowProfilePictures()Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyShowUrlPreview()Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getAutomaticallyStartPlayback()Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getComposeSignature()Ljava/lang/String;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getDontAskForNotificationPermissions()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getDontShowOnchainPublicWarning()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getDontShowPushNotificationSelector()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getFeatureSet()Lcom/vitorpamplona/amethyst/commons/model/FeatureSetType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getFontFamily()Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getFontSize()Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getGallerySet()Lcom/vitorpamplona/amethyst/commons/model/ProfileGalleryType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getPreferredLanguage()Ljava/lang/String;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowHomeConversationsTab()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowHomeEverythingTab()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowHomeNewThreadsTab()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowOnchainWallet()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowProfileAppRecommendations()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowProfileBadges()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowProfileFollowersFeed()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getShowProfileZapReceivedFeed()Z
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getSuggestWorkoutsFromHealthConnect()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getTheme()Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings;->getUseTrackedBroadcasts()Lcom/vitorpamplona/amethyst/commons/model/BooleanType;
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda0;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda0;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda1;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda1;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda10;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda10;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda11;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda11;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda12;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda12;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda13;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda13;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda14;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda14;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda15;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda15;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda2;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda2;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda3;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda3;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda4;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda4;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda5;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda5;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda6;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda6;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda7;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda7;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda8;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda8;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda9;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$$ExternalSyntheticLambda9;-><init>()V
Lcom/vitorpamplona/amethyst/commons/model/UiSettings$Companion;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$Companion;-><init>()V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettings$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;-><init>(Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/MutableStateFlow;)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAccentColor()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAutomaticallyPlayVideos()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAutomaticallyShowImages()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAutomaticallyShowProfilePictures()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAutomaticallyShowUrlPreview()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getAutomaticallyStartPlayback()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getFontFamily()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getFontSize()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getPreferredLanguage()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getPropertyWatchFlow()Lkotlinx/coroutines/flow/Flow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->getTheme()Lkotlinx/coroutines/flow/MutableStateFlow;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;->toSettings()Lcom/vitorpamplona/amethyst/commons/model/UiSettings;
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$Companion;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$Companion;-><init>()V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$Companion;->build(Lcom/vitorpamplona/amethyst/commons/model/UiSettings;)Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1;-><init>([Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$1;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$1;-><init>(Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$2;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$2;-><init>([Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$2;->invoke()Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$2;->invoke()[Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$3;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$3;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$3;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$3;->invoke(Lkotlinx/coroutines/flow/FlowCollector;[Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow$special$$inlined$combine$1$3;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/accountsCache/AccountCacheState;
SPLcom/vitorpamplona/amethyst/model/accountsCache/AccountCacheState;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/accountsCache/AccountCacheState;-><init>(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lcom/vitorpamplona/amethyst/model/LocalCache;Lcom/vitorpamplona/quartz/nip01Core/relay/client/INostrClient;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lcom/vitorpamplona/amethyst/commons/connectedApps/signers/NostrSignerPermissionStore;Lcom/vitorpamplona/amethyst/commons/connectedApps/nip46/Nip46ClientStore;)V
@@ -23460,7 +23460,7 @@ SPLcom/vitorpamplona/amethyst/model/preferences/UISharedPreferencesKt;-><clinit>
SPLcom/vitorpamplona/amethyst/model/preferences/UISharedPreferencesKt;->getSharedPreferencesDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;
Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;-><clinit>()V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;-><init>(Lcom/vitorpamplona/amethyst/model/UiSettings;Landroid/content/Context;Lkotlinx/coroutines/CoroutineScope;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;-><init>(Lcom/vitorpamplona/amethyst/commons/model/UiSettings;Landroid/content/Context;Lkotlinx/coroutines/CoroutineScope;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->access$applyLanguage(Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->access$getUI_ACCENT_COLOR$cp()Landroidx/datastore/preferences/core/Preferences$Key;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->access$getUI_AUTOMATICALLY_CREATE_DRAFTS$cp()Landroidx/datastore/preferences/core/Preferences$Key;
@@ -23493,7 +23493,7 @@ SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->access$get
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->access$getUI_USE_TRACKED_BROADCASTS$cp()Landroidx/datastore/preferences/core/Preferences$Key;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->applyLanguage(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->getContext()Landroid/content/Context;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->getValue()Lcom/vitorpamplona/amethyst/model/UiSettingsFlow;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;->getValue()Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;
Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;-><init>()V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -23526,13 +23526,13 @@ SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->getUI_SUGGEST_WORKOUTS_FROM_HEALTH_CONNECT()Landroidx/datastore/preferences/core/Preferences$Key;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->getUI_THEME()Landroidx/datastore/preferences/core/Preferences$Key;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->getUI_USE_TRACKED_BROADCASTS()Landroidx/datastore/preferences/core/Preferences$Key;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->save(Lcom/vitorpamplona/amethyst/model/UiSettings;Landroid/content/Context;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->save(Lcom/vitorpamplona/amethyst/commons/model/UiSettings;Landroid/content/Context;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;->uiPreferences(Landroid/content/Context;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$1;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$1;-><init>(Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion;Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;-><init>(Lcom/vitorpamplona/amethyst/model/UiSettings;Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;-><init>(Lcom/vitorpamplona/amethyst/commons/model/UiSettings;Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;->invoke(Landroidx/datastore/preferences/core/MutablePreferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$Companion$save$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@@ -23549,7 +23549,7 @@ SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$languageUpda
Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;-><init>(Lcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences;Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;->invoke(Lcom/vitorpamplona/amethyst/model/UiSettings;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;->invoke(Lcom/vitorpamplona/amethyst/commons/model/UiSettings;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/model/preferences/UiSharedPreferences$saving$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/model/privacyOptions/IRoleBasedHttpClientBuilder;
@@ -24832,49 +24832,49 @@ SPLcom/vitorpamplona/amethyst/ui/screen/ComposableSingletons$AccountScreenKt;->l
Lcom/vitorpamplona/amethyst/ui/screen/ComposableSingletons$AccountScreenKt$$ExternalSyntheticLambda0;
SPLcom/vitorpamplona/amethyst/ui/screen/ComposableSingletons$AccountScreenKt$$ExternalSyntheticLambda0;-><init>()V
SPLcom/vitorpamplona/amethyst/ui/screen/ComposableSingletons$AccountScreenKt$$ExternalSyntheticLambda0;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState;-><clinit>()V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState;-><init>(Lcom/vitorpamplona/amethyst/model/UiSettingsFlow;Lkotlinx/coroutines/flow/StateFlow;Lkotlinx/coroutines/CoroutineScope;)V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$WhenMappings;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1;->invoke(Lcom/vitorpamplona/amethyst/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showImages$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1;->invoke(Lcom/vitorpamplona/amethyst/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showProfilePictures$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1;->invoke(Lcom/vitorpamplona/amethyst/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$showUrlPreview$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1;-><init>(Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$1;-><init>(Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2$1;-><init>(Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$special$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1;->invoke(Lcom/vitorpamplona/amethyst/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/ui/screen/UiSettingsState$startVideoPlayback$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState;-><clinit>()V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState;-><init>(Lcom/vitorpamplona/amethyst/commons/model/UiSettingsFlow;Lkotlinx/coroutines/flow/StateFlow;Lkotlinx/coroutines/CoroutineScope;)V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$WhenMappings;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1;->invoke(Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showImages$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1;->invoke(Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showProfilePictures$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1;->invoke(Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$showUrlPreview$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1;-><init>(Lkotlinx/coroutines/flow/Flow;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1;->collect(Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$1;-><init>(Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2;-><init>(Lkotlinx/coroutines/flow/FlowCollector;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2$1;-><init>(Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$special$$inlined$map$1$2;Lkotlin/coroutines/Continuation;)V
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1;-><init>(Lkotlin/coroutines/Continuation;)V
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1;->invoke(Lcom/vitorpamplona/amethyst/commons/model/ConnectivityType;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1$WhenMappings;
SPLcom/vitorpamplona/amethyst/commons/ui/screen/UiSettingsState$startVideoPlayback$1$WhenMappings;-><clinit>()V
Lcom/vitorpamplona/amethyst/ui/screen/loggedIn/apps/recommendations/datasource/ProfileAppRecommendationsFilterAssembler;
SPLcom/vitorpamplona/amethyst/ui/screen/loggedIn/apps/recommendations/datasource/ProfileAppRecommendationsFilterAssembler;-><clinit>()V
SPLcom/vitorpamplona/amethyst/ui/screen/loggedIn/apps/recommendations/datasource/ProfileAppRecommendationsFilterAssembler;-><init>(Lcom/vitorpamplona/quartz/nip01Core/relay/client/INostrClient;)V
@@ -25638,23 +25638,23 @@ Lcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->$r8$lambda$7JAdMf4levt4F3mr6nvsppu__xY(Landroidx/compose/ui/unit/Density;Landroidx/compose/ui/text/font/FontFamily;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)Lkotlin/Unit;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->$r8$lambda$GsT95FSXMVwriWjqAt3KW-oAPpo(Landroid/view/View;ZLandroidx/compose/material3/ColorScheme;)Lkotlin/Unit;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;-><clinit>()V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$0(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/model/ThemeType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$1(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$0(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/commons/model/ThemeType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$1(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$10$0(Landroid/view/View;ZLandroidx/compose/material3/ColorScheme;)Lkotlin/Unit;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$2(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$3(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$2(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$3(Landroidx/compose/runtime/State;)Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$9$0(Landroidx/compose/ui/unit/Density;Landroidx/compose/ui/text/font/FontFamily;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)Lkotlin/Unit;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme$lambda$9(Landroidx/compose/ui/unit/Density;Landroidx/compose/ui/text/font/FontFamily;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)Lkotlin/Unit;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme(Lcom/vitorpamplona/amethyst/model/ThemeType;Lcom/vitorpamplona/amethyst/model/AccentColorType;Lcom/vitorpamplona/amethyst/model/FontFamilyType;Lcom/vitorpamplona/amethyst/model/FontSizeType;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme(Lcom/vitorpamplona/amethyst/commons/model/ThemeType;Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->AmethystTheme(Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->accentContainer-DxMtmZc(JZ)J
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->accentPrimary(Lcom/vitorpamplona/amethyst/model/AccentColorType;Z)J
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->accentSecondary(Lcom/vitorpamplona/amethyst/model/AccentColorType;Z)J
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->darkColors(Lcom/vitorpamplona/amethyst/model/AccentColorType;)Landroidx/compose/material3/ColorScheme;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->accentPrimary(Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;Z)J
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->accentSecondary(Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;Z)J
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->darkColors(Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;)Landroidx/compose/material3/ColorScheme;
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->getPlaceholderText(Landroidx/compose/material3/ColorScheme;)J
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->getTransparentBackground(Landroidx/compose/material3/ColorScheme;)J
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->isLight(Landroidx/compose/material3/ColorScheme;)Z
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->lightColors(Lcom/vitorpamplona/amethyst/model/AccentColorType;)Landroidx/compose/material3/ColorScheme;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->lightColors(Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;)Landroidx/compose/material3/ColorScheme;
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->onAccent-8_81llA(J)J
SPLcom/vitorpamplona/amethyst/commons/ui/theme/AmethystColorSchemeKt;->onAccentContainer-DxMtmZc(JZ)J
Lcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda0;
@@ -25669,7 +25669,7 @@ Lcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda3;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda3;-><init>(Landroid/view/View;ZLandroidx/compose/material3/ColorScheme;)V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda3;->invoke()Ljava/lang/Object;
Lcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda4;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda4;-><init>(Lcom/vitorpamplona/amethyst/model/ThemeType;Lcom/vitorpamplona/amethyst/model/AccentColorType;Lcom/vitorpamplona/amethyst/model/FontFamilyType;Lcom/vitorpamplona/amethyst/model/FontSizeType;Lkotlin/jvm/functions/Function2;II)V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$$ExternalSyntheticLambda4;-><init>(Lcom/vitorpamplona/amethyst/commons/model/ThemeType;Lcom/vitorpamplona/amethyst/commons/model/AccentColorType;Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;Lcom/vitorpamplona/amethyst/commons/model/FontSizeType;Lkotlin/jvm/functions/Function2;II)V
Lcom/vitorpamplona/amethyst/ui/theme/ThemeKt$MarkDownStyleOnDark$1;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$MarkDownStyleOnDark$1;-><clinit>()V
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt$MarkDownStyleOnDark$1;-><init>()V
@@ -25685,7 +25685,7 @@ SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt;->getDefaultParagraphSpaci
SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt;->getFont14SP()J
SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt;->getFont17SP()J
SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt;->getTypography()Landroidx/compose/material3/Typography;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->toFontFamily(Lcom/vitorpamplona/amethyst/model/FontFamilyType;)Landroidx/compose/ui/text/font/FontFamily;
SPLcom/vitorpamplona/amethyst/ui/theme/ThemeKt;->toFontFamily(Lcom/vitorpamplona/amethyst/commons/model/FontFamilyType;)Landroidx/compose/ui/text/font/FontFamily;
SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt;->withFontFamily(Landroidx/compose/material3/Typography;Landroidx/compose/ui/text/font/FontFamily;)Landroidx/compose/material3/Typography;
Lcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt$$ExternalSyntheticLambda0;
SPLcom/vitorpamplona/amethyst/commons/ui/theme/TypeKt$$ExternalSyntheticLambda0;-><init>()V
@@ -28,6 +28,7 @@ import androidx.security.crypto.EncryptedSharedPreferences
import coil3.disk.DiskCache
import coil3.memory.MemoryCache
import com.vitorpamplona.amethyst.commons.model.NoteState
import com.vitorpamplona.amethyst.commons.model.UiSettings
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip03Timestamp.BitcoinExplorerEndpoint
import com.vitorpamplona.amethyst.commons.model.nip03Timestamp.IncomingOtsEventVerifier
@@ -56,10 +57,10 @@ import com.vitorpamplona.amethyst.commons.service.lnurl.OkHttpLnurlEndpointResol
import com.vitorpamplona.amethyst.commons.service.pow.PoWPolicy
import com.vitorpamplona.amethyst.commons.service.pow.PoWPublishQueue
import com.vitorpamplona.amethyst.commons.tor.TorSettings
import com.vitorpamplona.amethyst.commons.ui.screen.UiSettingsState
import com.vitorpamplona.amethyst.connectedApps.DataStoreNostrSignerPermissionStore
import com.vitorpamplona.amethyst.connectedApps.nip46.DataStoreNip46ClientStore
import com.vitorpamplona.amethyst.model.Account
import com.vitorpamplona.amethyst.model.UiSettings
import com.vitorpamplona.amethyst.model.accountsCache.AccountCacheState
import com.vitorpamplona.amethyst.model.nip11RelayInfo.Nip11CachedRetriever
import com.vitorpamplona.amethyst.model.preferences.BuzzAttestationPreferences
@@ -132,7 +133,6 @@ import com.vitorpamplona.amethyst.service.uploads.nip95.Nip95CacheFactory
import com.vitorpamplona.amethyst.ui.resourceCacheInit
import com.vitorpamplona.amethyst.ui.screen.AccountSessionManager
import com.vitorpamplona.amethyst.ui.screen.AccountState
import com.vitorpamplona.amethyst.ui.screen.UiSettingsState
import com.vitorpamplona.amethyst.ui.tor.TorManager
import com.vitorpamplona.amethyst.ui.tor.TorService
import com.vitorpamplona.quartz.nip01Core.core.Address
@@ -26,6 +26,7 @@ import android.content.SharedPreferences
import androidx.compose.runtime.Immutable
import androidx.core.content.edit
import com.vitorpamplona.amethyst.commons.model.HomeFeedType
import com.vitorpamplona.amethyst.commons.model.UiSettings
import com.vitorpamplona.amethyst.commons.model.chats.ChatFeedType
import com.vitorpamplona.amethyst.commons.model.clink.ClinkDebitWalletEntry
import com.vitorpamplona.amethyst.commons.model.concord.ConcordViewMode
@@ -37,7 +38,6 @@ import com.vitorpamplona.amethyst.commons.model.nip47WalletConnect.NwcWalletEntr
import com.vitorpamplona.amethyst.commons.model.topNavFeeds.TopFilter
import com.vitorpamplona.amethyst.commons.relayauth.RelayAuthPolicy
import com.vitorpamplona.amethyst.model.AccountSettings
import com.vitorpamplona.amethyst.model.UiSettings
import com.vitorpamplona.amethyst.model.backups.BackupConflictStorage
import com.vitorpamplona.amethyst.model.nip60Cashu.CashuPreferences
import com.vitorpamplona.amethyst.service.checkNotInMainThread
@@ -27,8 +27,8 @@ import android.os.Bundle
import android.widget.Toast
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.favorites.FavoriteApp
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.napplet.NappletLauncher
import com.vitorpamplona.amethyst.napplet.NappletWebViewProfiles
import com.vitorpamplona.amethyst.napplet.WebAppNetworkRegistry
@@ -34,16 +34,16 @@ import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.stringPreferencesKey
import androidx.datastore.preferences.preferencesDataStore
import com.vitorpamplona.amethyst.LocalPreferences
import com.vitorpamplona.amethyst.model.AccentColorType
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.model.ConnectivityType
import com.vitorpamplona.amethyst.model.FeatureSetType
import com.vitorpamplona.amethyst.model.FontFamilyType
import com.vitorpamplona.amethyst.model.FontSizeType
import com.vitorpamplona.amethyst.model.ProfileGalleryType
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.model.UiSettings
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.model.AccentColorType
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.ConnectivityType
import com.vitorpamplona.amethyst.commons.model.FeatureSetType
import com.vitorpamplona.amethyst.commons.model.FontFamilyType
import com.vitorpamplona.amethyst.commons.model.FontSizeType
import com.vitorpamplona.amethyst.commons.model.ProfileGalleryType
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.model.UiSettings
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.quartz.utils.Log
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -25,10 +25,10 @@ import android.content.Intent
import android.content.res.Configuration
import android.os.Bundle
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.napplet.NappletArtifactPolicy
import com.vitorpamplona.amethyst.commons.napplet.NappletIdentity
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.napplethost.HostProfile
import com.vitorpamplona.amethyst.napplethost.NappletHostActivity
import com.vitorpamplona.amethyst.napplethost.NappletHostContract
@@ -27,6 +27,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.relayauth.AuthPurposeKind
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.relay_auth_purpose_my_inbox
@@ -53,9 +54,9 @@ internal fun LoadRelayAuthUser(
accountViewModel: AccountViewModel,
content: @Composable (User?) -> Unit,
) {
var user by remember(pubkey) { mutableStateOf(accountViewModel.getUserIfExists(pubkey)) }
var user by remember(pubkey) { mutableStateOf(LocalCache.getUserIfExists(pubkey)) }
if (user == null) {
LaunchedEffect(pubkey) { user = accountViewModel.checkGetOrCreateUser(pubkey) }
LaunchedEffect(pubkey) { user = LocalCache.checkGetOrCreateUser(pubkey) }
}
content(user)
}
@@ -602,9 +602,9 @@ private fun rememberCounterpartyName(
pubkey: HexKey,
accountViewModel: AccountViewModel,
): String {
var user by remember(pubkey) { mutableStateOf(accountViewModel.getUserIfExists(pubkey)) }
var user by remember(pubkey) { mutableStateOf(LocalCache.getUserIfExists(pubkey)) }
if (user == null) {
LaunchedEffect(pubkey) { user = accountViewModel.checkGetOrCreateUser(pubkey) }
LaunchedEffect(pubkey) { user = LocalCache.checkGetOrCreateUser(pubkey) }
}
val loaded = user ?: return stringRes(Res.string.relay_auth_someone_unloaded)
val metadata by observeUserInfo(loaded, accountViewModel)
@@ -649,11 +649,11 @@ private fun rememberVenueLabel(
?: when {
venueId.length == 64 ->
if (kind == AuthPurposeKind.POST_VENUE) {
accountViewModel.checkGetOrCreatePublicChatChannel(venueId)
LocalCache.getOrCreatePublicChatChannel(venueId)
} else {
LocalCache.getPublicChatChannelIfExists(venueId)
}
venueId.startsWith("30311:") -> Address.parse(venueId)?.let { accountViewModel.checkGetOrCreateLiveActivityChannel(it) }
venueId.startsWith("30311:") -> Address.parse(venueId)?.let { LocalCache.getOrCreateLiveChannel(it) }
else -> null
}
}
@@ -702,9 +702,9 @@ private fun rememberDisplayName(
pubkey: HexKey,
accountViewModel: AccountViewModel,
): String {
var user by remember(pubkey) { mutableStateOf(accountViewModel.getUserIfExists(pubkey)) }
var user by remember(pubkey) { mutableStateOf(LocalCache.getUserIfExists(pubkey)) }
if (user == null) {
LaunchedEffect(pubkey) { user = accountViewModel.checkGetOrCreateUser(pubkey) }
LaunchedEffect(pubkey) { user = LocalCache.checkGetOrCreateUser(pubkey) }
}
val loaded = user ?: return stringRes(Res.string.relay_auth_someone_unloaded)
// Reading the observed metadata registers a snapshot read, so the name updates when it arrives.
@@ -27,6 +27,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.model.Channel
import com.vitorpamplona.amethyst.commons.model.ChannelState
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip28PublicChats.PublicChatChannel
import com.vitorpamplona.amethyst.commons.model.nip53LiveActivities.LiveActivitiesChannel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -102,7 +103,7 @@ private fun channelToParticipatingUsers(
val pKeys = channel.info?.participantKeys() ?: emptyList()
pKeys.forEach {
val u = accountViewModel.checkGetOrCreateUser(it)
val u = LocalCache.checkGetOrCreateUser(it)
if (u != null) {
users.add(u)
}
@@ -45,12 +45,12 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.copy_stack_to_clipboard
import com.vitorpamplona.amethyst.commons.resources.error_dialog_button_ok
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ThrowableToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ThrowableToastMsg2
import com.vitorpamplona.amethyst.commons.ui.components.util.setText
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.Size16dp
import com.vitorpamplona.amethyst.commons.ui.theme.StdHorzSpacer
import com.vitorpamplona.amethyst.ui.components.toasts.ThrowableToastMsg
import com.vitorpamplona.amethyst.ui.components.toasts.ThrowableToastMsg2
import kotlinx.coroutines.launch
import java.io.PrintWriter
import java.io.StringWriter
@@ -38,9 +38,9 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.service.broadcast.BroadcastEvent
import com.vitorpamplona.amethyst.commons.service.pow.PoWJobState
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
import kotlinx.collections.immutable.ImmutableList
@@ -43,6 +43,7 @@ import com.vitorpamplona.amethyst.commons.model.EmptyTagList
import com.vitorpamplona.amethyst.commons.model.ImmutableListOfLists
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.navigation.routeFor
import com.vitorpamplona.amethyst.commons.resources.Res
@@ -101,7 +102,7 @@ fun LoadOrCreateNote(
content: @Composable (Note?) -> Unit,
) {
var note by
remember(event.id) { mutableStateOf(accountViewModel.getNoteIfExists(event.id)) }
remember(event.id) { mutableStateOf(LocalCache.getNoteIfExists(event.id)) }
if (note == null) {
LaunchedEffect(key1 = event.id) {
@@ -224,11 +225,11 @@ private fun DisplayAddress(
return
}
var noteBase by remember(nip19) { mutableStateOf(accountViewModel.getNoteIfExists(nip19.aTag())) }
var noteBase by remember(nip19) { mutableStateOf(LocalCache.getNoteIfExists(nip19.aTag())) }
if (noteBase == null) {
LaunchedEffect(key1 = nip19) {
noteBase = accountViewModel.getOrCreateAddressableNote(nip19.address())
noteBase = LocalCache.getOrCreateAddressableNote(nip19.address())
}
}
@@ -271,13 +272,13 @@ fun DisplayUser(
var userBase by
remember(userHex) {
mutableStateOf(
accountViewModel.getUserIfExists(userHex),
LocalCache.getUserIfExists(userHex),
)
}
if (userBase == null) {
LaunchedEffect(key1 = userHex) {
userBase = accountViewModel.checkGetOrCreateUser(userHex)
userBase = LocalCache.checkGetOrCreateUser(userHex)
}
}
@@ -57,6 +57,7 @@ import com.vitorpamplona.amethyst.commons.resources.no_wallet_found
import com.vitorpamplona.amethyst.commons.resources.no_zap_amount_setup_long_press_to_change
import com.vitorpamplona.amethyst.commons.resources.thank_you
import com.vitorpamplona.amethyst.commons.ui.components.CrossfadeIfEnabled
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.note.ZapIcon
import com.vitorpamplona.amethyst.commons.ui.note.ZappedIcon
@@ -67,7 +68,6 @@ import com.vitorpamplona.amethyst.commons.ui.theme.Size20Modifier
import com.vitorpamplona.amethyst.commons.ui.theme.Size35dp
import com.vitorpamplona.amethyst.service.ZapPaymentHandler
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.UserFinderFilterAssemblerSubscription
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.ui.note.ObserveZapIcon
import com.vitorpamplona.amethyst.ui.note.ZapAmountChoicePopup
import com.vitorpamplona.amethyst.ui.note.payViaIntent
@@ -883,11 +883,11 @@ fun LoadNote(
content: @Composable (Note?) -> Unit,
) {
var note by
remember(baseNoteHex) { mutableStateOf(accountViewModel.getNoteIfExists(baseNoteHex)) }
remember(baseNoteHex) { mutableStateOf(LocalCache.getNoteIfExists(baseNoteHex)) }
if (note == null) {
LaunchedEffect(key1 = baseNoteHex) {
note = accountViewModel.checkGetOrCreateNote(baseNoteHex)
note = LocalCache.checkGetOrCreateNote(baseNoteHex)
}
}
@@ -22,10 +22,16 @@ package com.vitorpamplona.amethyst.ui.components.toasts
import androidx.compose.runtime.Composable
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ActionableStringToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ResourceToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.StringToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ThrowableToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ThrowableToastMsg2
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ToastManager
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.ui.actions.InformationDialog
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.MultiUserErrorMessageDialog
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -40,10 +46,11 @@ fun DisplayErrorMessages(
openDialogMsg.value?.let { obj ->
when (obj) {
is ResourceToastMsg -> {
if (obj.params != null) {
val params = obj.params
if (params != null) {
InformationDialog(
stringRes(obj.titleResId),
stringRes(obj.resourceId, *obj.params),
stringRes(obj.resourceId, *params),
) {
toastManager.clearToasts()
}
@@ -48,6 +48,8 @@ import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.error_dialog_talk_to_user
import com.vitorpamplona.amethyst.commons.resources.error_dialog_talk_to_user_name
import com.vitorpamplona.amethyst.commons.resources.error_dialog_zap_error
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.EmptyNav
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
@@ -34,6 +34,7 @@ import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.error_dialog_button_ok
import com.vitorpamplona.amethyst.commons.resources.error_dialog_zap_error
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.EmptyNav
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
@@ -34,6 +34,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.emphChat.EphemeralChatChannel
import com.vitorpamplona.amethyst.commons.model.nip03Timestamp.earliestOtsVerifiedTime
import com.vitorpamplona.amethyst.commons.model.nip28PublicChats.PublicChatChannel
@@ -95,10 +96,10 @@ fun LoadAddressableNote(
content: @Composable (AddressableNote?) -> Unit,
) {
val note by produceState(
accountViewModel.getAddressableNoteIfExists(address),
LocalCache.getAddressableNoteIfExists(address),
address,
) {
val newNote = accountViewModel.getOrCreateAddressableNote(address)
val newNote = LocalCache.getOrCreateAddressableNote(address)
if (newNote != value) {
value = newNote
}
@@ -152,8 +153,8 @@ fun LoadPublicChatChannel(
accountViewModel: AccountViewModel,
content: @Composable (PublicChatChannel) -> Unit,
) {
val channel by produceStateIfNotNull(accountViewModel.getPublicChatChannelIfExists(id), id) {
value = accountViewModel.checkGetOrCreatePublicChatChannel(id)
val channel by produceStateIfNotNull(LocalCache.getPublicChatChannelIfExists(id), id) {
value = LocalCache.getOrCreatePublicChatChannel(id)
}
channel?.let { content(it) }
@@ -166,8 +167,8 @@ fun LoadEphemeralChatChannel(
content: @Composable (EphemeralChatChannel) -> Unit,
) {
val channel =
produceStateIfNotNull(accountViewModel.getEphemeralChatChannelIfExists(id), id) {
value = accountViewModel.checkGetOrCreateEphemeralChatChannel(id)
produceStateIfNotNull(LocalCache.getEphemeralChatChannelIfExists(id), id) {
value = LocalCache.getOrCreateEphemeralChannel(id)
}
channel.value?.let { content(it) }
@@ -180,8 +181,8 @@ fun LoadLiveActivityChannel(
content: @Composable (LiveActivitiesChannel) -> Unit,
) {
val channel =
produceStateIfNotNull(accountViewModel.getLiveActivityChannelIfExists(id), id) {
value = accountViewModel.checkGetOrCreateLiveActivityChannel(id)
produceStateIfNotNull(LocalCache.getLiveActivityChannelIfExists(id), id) {
value = LocalCache.getOrCreateLiveChannel(id)
}
channel.value?.let { content(it) }
@@ -154,6 +154,7 @@ import com.vitorpamplona.amethyst.commons.ui.components.AnimatedBorderTextCorner
import com.vitorpamplona.amethyst.commons.ui.components.ClickableBox
import com.vitorpamplona.amethyst.commons.ui.components.CrossfadeIfEnabled
import com.vitorpamplona.amethyst.commons.ui.components.GenericLoadable
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.components.util.setText
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.note.ChangeReactionIcon
@@ -228,7 +229,6 @@ import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.observeUse
import com.vitorpamplona.amethyst.ui.actions.uploads.FloatingRecordingIndicator
import com.vitorpamplona.amethyst.ui.actions.uploads.MAX_VOICE_RECORD_SECONDS
import com.vitorpamplona.amethyst.ui.actions.uploads.RecordAudioBox
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.ui.navigation.routes.routeReplyTo
import com.vitorpamplona.amethyst.ui.note.elements.ShareOptionsBottomSheet
import com.vitorpamplona.amethyst.ui.note.types.EditState
@@ -370,7 +370,6 @@ fun BaseUserPicture(
userName = userName,
size = size,
modifier = innerModifier,
accountViewModel = accountViewModel,
)
}
@@ -405,7 +404,6 @@ fun BaseUserPicture(
userName = null,
size = size,
modifier = innerModifier,
accountViewModel = accountViewModel,
)
}
}
@@ -433,7 +431,6 @@ fun ObserveAndDrawInnerUserPicture(
userName = userProfile?.info?.bestName(),
size = size,
modifier = innerModifier,
accountViewModel = accountViewModel,
)
}
@@ -455,7 +452,6 @@ fun ScoreTag55Preview() {
userName = PREVIEW_USER_NAME,
size = size,
modifier = Modifier,
accountViewModel = accountViewModel,
)
FollowingIcon(Modifier.size(size.div(3.5f)))
ScoreTag(100, size, Modifier.align(Alignment.BottomCenter))
@@ -468,7 +464,6 @@ fun ScoreTag55Preview() {
userName = PREVIEW_USER_NAME,
size = size,
modifier = Modifier,
accountViewModel = accountViewModel,
)
FollowingIcon(Modifier.size(size.div(3.5f)))
ScoreTag(100, size, Modifier.align(Alignment.BottomCenter))
@@ -481,7 +476,6 @@ fun ScoreTag55Preview() {
userName = PREVIEW_USER_NAME,
size = size,
modifier = Modifier,
accountViewModel = accountViewModel,
)
FollowingIcon(Modifier.size(size.div(3.5f)))
ScoreTag(100, size, Modifier.align(Alignment.BottomCenter))
@@ -494,7 +488,6 @@ fun ScoreTag55Preview() {
userName = PREVIEW_USER_NAME,
size = size,
modifier = Modifier,
accountViewModel = accountViewModel,
)
FollowingIcon(Modifier.size(size.div(3.5f)))
ScoreTag(100, size, Modifier.align(Alignment.BottomCenter))
@@ -507,7 +500,6 @@ fun ScoreTag55Preview() {
userName = PREVIEW_USER_NAME,
size = size,
modifier = Modifier,
accountViewModel = accountViewModel,
)
FollowingIcon(Modifier.size(size.div(3.5f)))
ScoreTag(100, size, Modifier.align(Alignment.BottomCenter))
@@ -534,7 +526,6 @@ fun InnerUserPicture(
userName: String?,
size: Dp,
modifier: Modifier,
accountViewModel: AccountViewModel,
) {
UserAvatar(
userHex = userHex,
@@ -547,12 +538,6 @@ fun InnerUserPicture(
} else {
stringRes(id = Res.string.profile_image)
},
loadProfilePicture = accountViewModel.settings.showProfilePictures(),
loadRobohash = accountViewModel.settings.isNotPerformanceMode(),
autoPlayGif =
accountViewModel.settings.autoPlayVideosFlow
.collectAsStateWithLifecycle()
.value,
)
}
@@ -99,6 +99,7 @@ import com.vitorpamplona.amethyst.commons.resources.zap_type_private
import com.vitorpamplona.amethyst.commons.resources.zap_type_private_explainer
import com.vitorpamplona.amethyst.commons.resources.zap_type_public
import com.vitorpamplona.amethyst.commons.resources.zap_type_public_explainer
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.insets.imePaddingSafe
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.navigation.topbars.TopBarWithBackButton
@@ -113,7 +114,6 @@ import com.vitorpamplona.amethyst.commons.ui.theme.ZeroPadding
import com.vitorpamplona.amethyst.commons.ui.theme.placeholderText
import com.vitorpamplona.amethyst.model.Account
import com.vitorpamplona.amethyst.service.ZapPaymentHandler
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.wallet.OnchainZapSendDialog
import com.vitorpamplona.quartz.nip01Core.core.Event
@@ -89,6 +89,7 @@ import com.vitorpamplona.amethyst.commons.resources.poll_is_closed_explainer
import com.vitorpamplona.amethyst.commons.resources.poll_unable_to_vote
import com.vitorpamplona.amethyst.commons.resources.read_only_user
import com.vitorpamplona.amethyst.commons.resources.zaps
import com.vitorpamplona.amethyst.commons.ui.components.toasts.StringToastMsg
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.EmptyNav
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
@@ -107,7 +108,6 @@ import com.vitorpamplona.amethyst.commons.ui.theme.subtleBorder
import com.vitorpamplona.amethyst.service.ZapPaymentHandler
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.event.observeNoteZaps
import com.vitorpamplona.amethyst.ui.components.TranslatableRichTextViewer
import com.vitorpamplona.amethyst.ui.components.toasts.StringToastMsg
import com.vitorpamplona.amethyst.ui.navigation.routes.routeToMessage
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel
@@ -29,12 +29,12 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.model.FeatureSetType
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.ui.components.GenericLoadable
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.EmptyNav
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonColumn
import com.vitorpamplona.amethyst.model.FeatureSetType
import com.vitorpamplona.amethyst.service.location.CachedReversedGeoLocations
import com.vitorpamplona.amethyst.ui.note.FirstUserInfoRow
import com.vitorpamplona.amethyst.ui.note.types.EditState
@@ -721,7 +721,7 @@ open class CommentPostViewModel :
if (replyingToEvent is CommunityDefinitionEvent) {
replyingToEvent.moderatorKeys().mapNotNull {
if (it != replyingToEvent.pubKey) {
accountViewModel.checkGetOrCreateUser(it)?.toPTag()
LocalCache.checkGetOrCreateUser(it)?.toPTag()
} else {
null
}
@@ -65,6 +65,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.composer.AudienceSelection
import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList
import com.vitorpamplona.amethyst.commons.relayClient.communities.CommunityFilterAssemblerSubscription
@@ -149,13 +150,13 @@ fun ReplyCommentPostScreen(
val context = LocalContext.current
LaunchedEffect(postViewModel, accountViewModel) {
replyId?.let { accountViewModel.getNoteIfExists(it) }?.let {
replyId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.reply(it)
}
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
quoteId?.let { accountViewModel.getNoteIfExists(it) }?.let {
quoteId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.quote(it)
}
message?.ifBlank { null }?.let {
@@ -315,8 +315,8 @@ fun AcceptBadgeControls(
val amAwardee = remember(award, myPubkey) { award.awardeeIds().contains(myPubkey) }
if (!amAwardee) return
val newNote = accountViewModel.getOrCreateAddressableNote(ProfileBadgesEvent.createAddress(myPubkey))
val oldNote = accountViewModel.getOrCreateAddressableNote(AcceptedBadgeSetEvent.createAddress(myPubkey))
val newNote = LocalCache.getOrCreateAddressableNote(ProfileBadgesEvent.createAddress(myPubkey))
val oldNote = LocalCache.getOrCreateAddressableNote(AcceptedBadgeSetEvent.createAddress(myPubkey))
val newState by newNote
.flow()
@@ -46,6 +46,7 @@ import com.vitorpamplona.amethyst.commons.model.EmptyTagList
import com.vitorpamplona.amethyst.commons.model.ImmutableListOfLists
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.highlights.HighlightQuote
import com.vitorpamplona.amethyst.commons.model.navigation.routeFor
import com.vitorpamplona.amethyst.commons.model.toImmutableListOfLists
@@ -308,23 +309,23 @@ private fun DisplayQuoteAuthor(
accountViewModel: AccountViewModel,
nav: INav,
) {
var userBase by remember { mutableStateOf(authorHex?.let { accountViewModel.getUserIfExists(it) }) }
var userBase by remember { mutableStateOf(authorHex?.let { LocalCache.getUserIfExists(it) }) }
if (userBase == null && authorHex != null) {
LaunchedEffect(authorHex) {
userBase = accountViewModel.checkGetOrCreateUser(authorHex)
userBase = LocalCache.checkGetOrCreateUser(authorHex)
}
}
var addressable by remember {
mutableStateOf(postAddress?.let { accountViewModel.getAddressableNoteIfExists(it) })
mutableStateOf(postAddress?.let { LocalCache.getAddressableNoteIfExists(it) })
}
if (addressable == null && postAddress != null) {
LaunchedEffect(key1 = postAddress) {
val newNote =
withContext(Dispatchers.IO) {
accountViewModel.getOrCreateAddressableNote(postAddress)
LocalCache.getOrCreateAddressableNote(postAddress)
}
if (addressable != newNote) {
addressable = newNote
@@ -333,14 +334,14 @@ private fun DisplayQuoteAuthor(
}
var version by remember {
mutableStateOf(postVersion?.let { accountViewModel.getNoteIfExists(it.eventId) })
mutableStateOf(postVersion?.let { LocalCache.getNoteIfExists(it.eventId) })
}
if (version == null && postVersion != null) {
LaunchedEffect(key1 = postVersion) {
val newNote =
withContext(Dispatchers.IO) {
accountViewModel.getOrCreateNote(postVersion.eventId)
LocalCache.getOrCreateNote(postVersion.eventId)
}
if (version != newNote) {
version = newNote
@@ -24,6 +24,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key
import androidx.compose.runtime.remember
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip71Video.CaptionTrack
import com.vitorpamplona.amethyst.commons.model.nip71Video.captionTracks
import com.vitorpamplona.amethyst.commons.model.nip71Video.mergeCaptionTracks
@@ -60,7 +61,7 @@ fun rememberCaptionTracks(
val resolved =
refs.pending.map { pending ->
key(pending.address.toValue()) {
val note = remember(pending.address) { accountViewModel.getOrCreateAddressableNote(pending.address) }
val note = remember(pending.address) { LocalCache.getOrCreateAddressableNote(pending.address) }
val trackEvent by observeNoteEvent<TextTrackEvent>(note, accountViewModel)
trackEvent?.toCaptionTrack(pending.tag)
}
@@ -603,9 +603,9 @@ private fun LoadAssetNote(
accountViewModel: AccountViewModel,
content: @Composable (Note?) -> Unit,
) {
val note by produceState<Note?>(initialValue = accountViewModel.getNoteIfExists(eventId), eventId) {
val note by produceState<Note?>(initialValue = LocalCache.getNoteIfExists(eventId), eventId) {
if (value == null) {
value = accountViewModel.checkGetOrCreateNote(eventId)
value = LocalCache.checkGetOrCreateNote(eventId)
}
}
content(note)
@@ -45,6 +45,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import com.vitorpamplona.amethyst.commons.model.EmptyTagList
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.routeFor
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.accept_the_suggestion
@@ -88,7 +89,7 @@ fun RenderTextModificationEvent(
val isAuthorTheLoggedUser =
remember {
val authorOfTheOriginalNote =
noteEvent.editedNote()?.let { accountViewModel.getNoteIfExists(it.eventId)?.author?.pubkeyHex ?: it.author }
noteEvent.editedNote()?.let { LocalCache.getNoteIfExists(it.eventId)?.author?.pubkeyHex ?: it.author }
mutableStateOf(accountViewModel.isLoggedUser(authorOfTheOriginalNote))
}
@@ -46,18 +46,17 @@ import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.model.Dao
import com.vitorpamplona.amethyst.commons.model.LiveHiddenUsers
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.backups.ReplaceableBackupConflict
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.concord.ConcordChannel
import com.vitorpamplona.amethyst.commons.model.emphChat.EphemeralChatChannel
import com.vitorpamplona.amethyst.commons.model.geohashChat.GeohashChatChannel
import com.vitorpamplona.amethyst.commons.model.navigation.BottomBarEntry
import com.vitorpamplona.amethyst.commons.model.navigation.NavBarItem
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.nip28PublicChats.PublicChatChannel
import com.vitorpamplona.amethyst.commons.model.nip29RelayGroups.RelayGroupChannel
import com.vitorpamplona.amethyst.commons.model.nip53LiveActivities.LiveActivitiesChannel
import com.vitorpamplona.amethyst.commons.model.nip56Reports.UserReportWarningState
import com.vitorpamplona.amethyst.commons.model.nip56Reports.dmReportWarningFor
import com.vitorpamplona.amethyst.commons.model.observables.CreatedAtComparator
@@ -103,15 +102,16 @@ import com.vitorpamplona.amethyst.commons.service.http.IRoleBasedHttpClientBuild
import com.vitorpamplona.amethyst.commons.service.pow.PoWCategory
import com.vitorpamplona.amethyst.commons.tor.TorType
import com.vitorpamplona.amethyst.commons.ui.components.UrlPreviewState
import com.vitorpamplona.amethyst.commons.ui.components.toasts.ToastManager
import com.vitorpamplona.amethyst.commons.ui.loadStringRes
import com.vitorpamplona.amethyst.commons.ui.notifications.CardFeedState
import com.vitorpamplona.amethyst.commons.ui.screen.UiSettingsState
import com.vitorpamplona.amethyst.commons.ui.state.GenericBaseCache
import com.vitorpamplona.amethyst.commons.ui.state.GenericBaseCacheAsync
import com.vitorpamplona.amethyst.logTime
import com.vitorpamplona.amethyst.model.Account
import com.vitorpamplona.amethyst.model.AccountSettings
import com.vitorpamplona.amethyst.model.LatestKeyPackageOwner
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.model.UrlCachedPreviewer
import com.vitorpamplona.amethyst.model.privacyOptions.RoleBasedHttpClientBuilder
import com.vitorpamplona.amethyst.service.ClinkDebitPayer
@@ -127,13 +127,11 @@ import com.vitorpamplona.amethyst.service.pow.powKindLabelRes
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.RelaySubscriptionsCoordinator
import com.vitorpamplona.amethyst.ui.actions.MediaSaverToDisk
import com.vitorpamplona.amethyst.ui.actions.NewMessageTagger
import com.vitorpamplona.amethyst.ui.components.toasts.ToastManager
import com.vitorpamplona.amethyst.ui.note.ZapAmountCommentNotification
import com.vitorpamplona.amethyst.ui.note.ZapraiserStatus
import com.vitorpamplona.amethyst.ui.note.payViaIntent
import com.vitorpamplona.amethyst.ui.note.showAmount
import com.vitorpamplona.amethyst.ui.note.showAmountInteger
import com.vitorpamplona.amethyst.ui.screen.UiSettingsState
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.marmotGroup.send.MarmotGroupIconChange
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.marmotGroup.send.MarmotGroupIconUpload
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.marmotGroup.send.MarmotGroupIconUploader
@@ -146,7 +144,6 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.wallet.ReloadMintRequest
import com.vitorpamplona.amethyst.ui.tor.TorSettingsFlow
import com.vitorpamplona.quartz.experimental.clink.debits.DebitResponse
import com.vitorpamplona.quartz.experimental.clink.pointers.NDebit
import com.vitorpamplona.quartz.experimental.ephemChat.chat.RoomId
import com.vitorpamplona.quartz.experimental.interactiveStories.InteractiveStoryBaseEvent
import com.vitorpamplona.quartz.experimental.interactiveStories.InteractiveStoryReadingStateEvent
import com.vitorpamplona.quartz.marmot.appComponents.EncryptedMediaReferenceV2
@@ -195,7 +192,6 @@ import com.vitorpamplona.quartz.nip19Bech32.entities.NPub
import com.vitorpamplona.quartz.nip19Bech32.entities.NRelay
import com.vitorpamplona.quartz.nip19Bech32.entities.NSec
import com.vitorpamplona.quartz.nip25Reactions.ReactionEvent
import com.vitorpamplona.quartz.nip29RelayGroups.GroupId
import com.vitorpamplona.quartz.nip37Drafts.DraftWrapEvent
import com.vitorpamplona.quartz.nip47WalletConnect.Nip47WalletConnect
import com.vitorpamplona.quartz.nip47WalletConnect.rpc.IErrorResponseLike
@@ -2266,32 +2262,6 @@ class AccountViewModel(
override fun getOrCreateAddressableNote(address: Address): AddressableNote = LocalCache.getOrCreateAddressableNote(address)
fun getAddressableNoteIfExists(key: String): AddressableNote? = LocalCache.getAddressableNoteIfExists(key)
fun getAddressableNoteIfExists(key: Address): AddressableNote? = LocalCache.getAddressableNoteIfExists(key)
fun checkGetOrCreatePublicChatChannel(key: HexKey): PublicChatChannel = LocalCache.getOrCreatePublicChatChannel(key)
fun checkGetOrCreateLiveActivityChannel(key: Address): LiveActivitiesChannel = LocalCache.getOrCreateLiveChannel(key)
fun checkGetOrCreateEphemeralChatChannel(key: RoomId): EphemeralChatChannel = LocalCache.getOrCreateEphemeralChannel(key)
fun getPublicChatChannelIfExists(hex: HexKey) = LocalCache.getPublicChatChannelIfExists(hex)
fun getEphemeralChatChannelIfExists(key: RoomId) = LocalCache.getEphemeralChatChannelIfExists(key)
fun checkGetOrCreateGeohashChannel(geohash: String): GeohashChatChannel = LocalCache.getOrCreateGeohashChannel(geohash)
fun getGeohashChannelIfExists(geohash: String) = LocalCache.getGeohashChannelIfExists(geohash)
fun checkGetOrCreateRelayGroupChannel(key: GroupId): RelayGroupChannel = LocalCache.getOrCreateRelayGroupChannel(key)
fun getRelayGroupChannelIfExists(key: GroupId) = LocalCache.getRelayGroupChannelIfExists(key)
fun getRelayGroupChannelsOnRelay(relay: NormalizedRelayUrl) = LocalCache.getRelayGroupChannelsOnRelay(relay)
fun getLiveActivityChannelIfExists(key: Address) = LocalCache.getLiveActivityChannelIfExists(key)
fun <T : PubKeyReferenceTag> loadParticipants(
participants: List<T>,
onReady: (ImmutableList<Pair<T, User>>) -> Unit,
@@ -515,9 +515,9 @@ internal fun observedUserInfo(
pubKey: HexKey,
accountViewModel: AccountViewModel,
): UserMetadata? {
var user by remember(pubKey) { mutableStateOf(accountViewModel.getUserIfExists(pubKey)) }
var user by remember(pubKey) { mutableStateOf(LocalCache.getUserIfExists(pubKey)) }
if (user == null) {
LaunchedEffect(pubKey) { user = accountViewModel.checkGetOrCreateUser(pubKey) }
LaunchedEffect(pubKey) { user = LocalCache.checkGetOrCreateUser(pubKey) }
}
val loaded = user ?: return null
val info by observeUserInfo(loaded, accountViewModel)
@@ -60,6 +60,7 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.backups.BackupEventType
import com.vitorpamplona.amethyst.commons.model.backups.ReplaceableBackupConflict
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.navigation.routeFor
import com.vitorpamplona.amethyst.commons.ui.components.RobohashFallbackAsyncImage
@@ -492,7 +493,7 @@ private fun LazyListScope.favoriteFeedItems(
val saved = (conflict.saved as? FavoriteAlgoFeedsListEvent)?.publicFavoriteAlgoFeeds().orEmpty()
spaceGrid("feed-", fates(saved, diff.feeds) { it.address }, { it.address.toValue() }) { bookmark, fate, modifier ->
AddressableSpaceTile(bookmark.address, fate, accountViewModel, modifier) {
nav.nav { accountViewModel.getAddressableNoteIfExists(bookmark.address)?.let { routeFor(it, accountViewModel.account) } }
nav.nav { LocalCache.getAddressableNoteIfExists(bookmark.address)?.let { routeFor(it, accountViewModel.account) } }
}
}
privateItemsCard(diff.privateItems)
@@ -86,8 +86,8 @@ fun ProfileBadgesScreen(
// historic awards land in cache while this screen is open.
ProfileBadgesFilterAssemblerSubscription(accountViewModel)
val newNote = accountViewModel.getOrCreateAddressableNote(ProfileBadgesEvent.createAddress(myPubkey))
val oldNote = accountViewModel.getOrCreateAddressableNote(AcceptedBadgeSetEvent.createAddress(myPubkey))
val newNote = LocalCache.getOrCreateAddressableNote(ProfileBadgesEvent.createAddress(myPubkey))
val oldNote = LocalCache.getOrCreateAddressableNote(AcceptedBadgeSetEvent.createAddress(myPubkey))
val newState by newNote
.flow()
@@ -103,7 +103,6 @@ private fun WatchAndDisplayUser(
userName = displayName,
size = Size20dp,
modifier = Modifier,
accountViewModel = accountViewModel,
)
WatchUserFollows(author.pubkeyHex, accountViewModel) { newFollowingState ->
@@ -28,6 +28,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import com.vitorpamplona.amethyst.commons.chats.ui.ChatSystemMessage
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.buzz_system_channel_archived
@@ -219,10 +220,10 @@ fun observeUserNameByHex(
): String {
if (pubkey == null) return ""
var user by remember(pubkey) { mutableStateOf(accountViewModel.getUserIfExists(pubkey)) }
var user by remember(pubkey) { mutableStateOf(LocalCache.getUserIfExists(pubkey)) }
if (user == null) {
LaunchedEffect(pubkey) { user = accountViewModel.checkGetOrCreateUser(pubkey) }
LaunchedEffect(pubkey) { user = LocalCache.checkGetOrCreateUser(pubkey) }
}
val loaded = user ?: return remember(pubkey) { pubkey.take(8) }
@@ -21,6 +21,7 @@
package com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.geohashChat
import androidx.compose.runtime.Composable
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.geohashChat.GeohashChatChannel
import com.vitorpamplona.amethyst.ui.note.produceStateIfNotNull
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -38,8 +39,8 @@ fun LoadGeohashChannel(
content: @Composable (GeohashChatChannel) -> Unit,
) {
val channel =
produceStateIfNotNull(accountViewModel.getGeohashChannelIfExists(geohash), geohash) {
value = accountViewModel.checkGetOrCreateGeohashChannel(geohash)
produceStateIfNotNull(LocalCache.getGeohashChannelIfExists(geohash), geohash) {
value = LocalCache.getOrCreateGeohashChannel(geohash)
}
channel.value?.let { content(it) }
@@ -49,6 +49,7 @@ import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.chats.ui.ThinSendButton
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.marmot_group_composer_disbanding
import com.vitorpamplona.amethyst.commons.resources.marmot_group_composer_leaving
@@ -121,7 +122,7 @@ fun MarmotGroupChatView(
// landed in LocalCache. checkGetOrCreateNote is a no-op for unknown ids.
if (replyToInnerNote != null) {
LaunchedEffect(replyToInnerNote) {
val parent = accountViewModel.checkGetOrCreateNote(replyToInnerNote)
val parent = LocalCache.checkGetOrCreateNote(replyToInnerNote)
if (parent != null) {
newMessageModel.reply(parent)
}
@@ -59,6 +59,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.chats.ui.ChatUnreadBadge
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.marmotGroups.MarmotGroupChatroom
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.resources.Res
@@ -329,7 +330,7 @@ fun MarmotGroupListItem(
previewEvent
?.pubKey
?.takeIf { it != myPubKey }
?.let { accountViewModel.getUserIfExists(it) }
?.let { LocalCache.getUserIfExists(it) }
val senderName =
if (senderUser != null) {
observeUserInfo(senderUser, accountViewModel).value?.info?.bestName()
@@ -33,6 +33,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.marmot_system_admin_added
import com.vitorpamplona.amethyst.commons.resources.marmot_system_admin_added_passive
@@ -167,7 +168,7 @@ class MarmotSystemRowRenderer(
/** A known display name, or a short key when the account is a stranger. */
@Composable
private fun displayName(pubkeyHex: String): String {
val user = accountViewModel.getUserIfExists(pubkeyHex)
val user = LocalCache.getUserIfExists(pubkeyHex)
return user?.toBestDisplayName() ?: pubkeyHex.take(8)
}
}
@@ -40,6 +40,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.feeds.FeedContentState
import com.vitorpamplona.amethyst.commons.feeds.FeedState
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.privateChatLastReadRoute
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.chats_history_proto_nip04
@@ -106,7 +107,7 @@ fun ChatroomView(
if (replyToNote != null) {
LaunchedEffect(key1 = replyToNote, newPostModel, accountViewModel) {
val replyNote = accountViewModel.checkGetOrCreateNote(replyToNote)
val replyNote = LocalCache.checkGetOrCreateNote(replyToNote)
if (replyNote != null) {
newPostModel.reply(replyNote)
}
@@ -114,7 +115,7 @@ fun ChatroomView(
}
if (editFromDraft != null) {
LaunchedEffect(editFromDraft, newPostModel, accountViewModel) {
val draftNote = accountViewModel.checkGetOrCreateNote(editFromDraft)
val draftNote = LocalCache.checkGetOrCreateNote(editFromDraft)
if (draftNote != null) {
newPostModel.editFromDraft(draftNote)
}
@@ -407,7 +407,7 @@ class ChatNewMessageViewModel :
}
if (replyId != null) {
replyTo.value = accountViewModel.checkGetOrCreateNote(replyId)
replyTo.value = LocalCache.checkGetOrCreateNote(replyId)
}
} else if (draftEvent is PrivateDmEvent) {
val recipientNPub = draftEvent.verifiedRecipientPubKey()?.let { Hex.decode(it).toNpub() }
@@ -415,7 +415,7 @@ class ChatNewMessageViewModel :
val replyId = draftEvent.replyTo()
if (replyId != null) {
replyTo.value = accountViewModel.checkGetOrCreateNote(replyId)
replyTo.value = LocalCache.checkGetOrCreateNote(replyId)
}
}
@@ -589,7 +589,7 @@ private fun rememberConcordDisplayName(
hex: HexKey,
accountViewModel: AccountViewModel,
): String {
val user = remember(hex) { accountViewModel.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val user = remember(hex) { LocalCache.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val name by observeUserName(user, accountViewModel)
return name
}
@@ -392,7 +392,7 @@ private fun rememberTypistName(
hex: String,
accountViewModel: AccountViewModel,
): String {
val user = remember(hex) { accountViewModel.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val user = remember(hex) { LocalCache.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val info by observeUserInfo(user, accountViewModel)
return info?.info?.bestName() ?: remember(user) { user.pubkeyDisplayHex() }
}
@@ -57,6 +57,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.concord.ConcordMembership
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.back
@@ -250,7 +251,7 @@ private fun ConcordMemberRow(
accountViewModel: AccountViewModel,
nav: INav,
) {
val user = remember(entry.pubkey) { accountViewModel.checkGetOrCreateUser(entry.pubkey) }
val user = remember(entry.pubkey) { LocalCache.checkGetOrCreateUser(entry.pubkey) }
val isOwnerTarget = entry.membership == ConcordMembership.OWNER
val isBanned = entry.membership == ConcordMembership.BANNED
val isAdmin = entry.membership == ConcordMembership.ADMIN
@@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.ui.layouts.DisappearingScaffold
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -44,8 +45,8 @@ fun EphemeralChatScreen(
) {
val relay = remember(relayUrl) { RelayUrlNormalizer.normalizeOrNull(relayUrl) } ?: return
val channelId = remember(id, relay) { RoomId(id, relay) }
val draft = remember(draftId) { draftId?.let { accountViewModel.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { accountViewModel.checkGetOrCreateNote(it) } }
val draft = remember(draftId) { draftId?.let { LocalCache.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { LocalCache.checkGetOrCreateNote(it) } }
DisappearingScaffold(
isInvertedLayout = true,
@@ -21,6 +21,7 @@
package com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.publicChannels.ephemChat
import androidx.compose.runtime.Composable
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.emphChat.EphemeralChatChannel
import com.vitorpamplona.amethyst.ui.note.produceStateIfNotNull
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -33,8 +34,8 @@ fun LoadEphemeralChatChannel(
content: @Composable (EphemeralChatChannel) -> Unit,
) {
val channel =
produceStateIfNotNull(accountViewModel.getEphemeralChatChannelIfExists(id), id) {
value = accountViewModel.checkGetOrCreateEphemeralChatChannel(id)
produceStateIfNotNull(LocalCache.getEphemeralChatChannelIfExists(id), id) {
value = LocalCache.getOrCreateEphemeralChannel(id)
}
channel.value?.let { content(it) }
@@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.ui.layouts.DisappearingScaffold
@@ -44,8 +45,8 @@ fun PublicChatChannelScreen(
) {
if (channelId == null) return
val draft = remember(draftId) { draftId?.let { accountViewModel.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { accountViewModel.checkGetOrCreateNote(it) } }
val draft = remember(draftId) { draftId?.let { LocalCache.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { LocalCache.checkGetOrCreateNote(it) } }
val selfRoute = remember(channelId) { Route.PublicChatChannel(channelId) }
DisappearingScaffold(
@@ -26,6 +26,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.service.OnlineChecker
import com.vitorpamplona.amethyst.ui.layouts.DisappearingScaffold
@@ -45,8 +46,8 @@ fun LiveActivityChannelScreen(
) {
if (channelId == null) return
val draft = remember(draftId) { draftId?.let { accountViewModel.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { accountViewModel.checkGetOrCreateNote(it) } }
val draft = remember(draftId) { draftId?.let { LocalCache.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { LocalCache.checkGetOrCreateNote(it) } }
DisappearingScaffold(
isInvertedLayout = true,
@@ -48,6 +48,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.nip53LiveActivities.LiveActivitiesChannel
import com.vitorpamplona.amethyst.commons.nip53LiveActivities.TopZapperEntry
@@ -92,11 +93,11 @@ fun LiveStreamTopZappers(
val goalId = channel.info?.goalEventId()
if (goalId != null) {
var goalNoteHolder by remember(goalId) {
mutableStateOf(accountViewModel.getNoteIfExists(goalId))
mutableStateOf(LocalCache.getNoteIfExists(goalId))
}
LaunchedEffect(goalId) {
if (goalNoteHolder == null) {
goalNoteHolder = accountViewModel.checkGetOrCreateNote(goalId)
goalNoteHolder = LocalCache.checkGetOrCreateNote(goalId)
}
topZappersVm.setGoalNote(goalNoteHolder)
}
@@ -56,6 +56,7 @@ import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.model.buzz.BuzzTypingState
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.buzz_typing_many
import com.vitorpamplona.amethyst.commons.resources.buzz_typing_one
@@ -184,7 +185,7 @@ private fun rememberTypistName(
hex: HexKey,
accountViewModel: AccountViewModel,
): String {
val user = remember(hex) { accountViewModel.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val user = remember(hex) { LocalCache.checkGetOrCreateUser(hex) } ?: return remember(hex) { hex.take(8) }
val info by observeUserInfo(user, accountViewModel)
return info?.info?.bestName() ?: remember(user) { user.pubkeyDisplayHex() }
}
@@ -21,6 +21,7 @@
package com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.publicChannels.relayGroup
import androidx.compose.runtime.Composable
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip29RelayGroups.RelayGroupChannel
import com.vitorpamplona.amethyst.ui.note.produceStateIfNotNull
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -33,8 +34,8 @@ fun LoadRelayGroupChannel(
content: @Composable (RelayGroupChannel) -> Unit,
) {
val channel =
produceStateIfNotNull(accountViewModel.getRelayGroupChannelIfExists(id), id) {
value = accountViewModel.checkGetOrCreateRelayGroupChannel(id)
produceStateIfNotNull(LocalCache.getRelayGroupChannelIfExists(id), id) {
value = LocalCache.getOrCreateRelayGroupChannel(id)
}
channel.value?.let { content(it) }
@@ -210,12 +210,12 @@ fun RelayGroupChannelListScreen(
// so the first frame doesn't reshuffle when the first emission arrives.
// remember the seed so the per-relay cache scan + sort runs once (on first composition / relay
// change), not on every recomposition — produceState evaluates its initialValue argument eagerly.
val initialChannels = remember(relay) { accountViewModel.getRelayGroupChannelsOnRelay(relay).sortedBySnapshot { it.toBestDisplayName().lowercase() } }
val initialChannels = remember(relay) { LocalCache.getRelayGroupChannelsOnRelay(relay).sortedBySnapshot { it.toBestDisplayName().lowercase() } }
val allChannels by produceState(initialValue = initialChannels, relay) {
LocalCache
.observeEvents<GroupMetadataEvent>(Filter(kinds = listOf(GroupMetadataEvent.KIND)))
.collect {
value = accountViewModel.getRelayGroupChannelsOnRelay(relay).sortedBySnapshot { it.toBestDisplayName().lowercase() }
value = LocalCache.getRelayGroupChannelsOnRelay(relay).sortedBySnapshot { it.toBestDisplayName().lowercase() }
}
}
@@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.ui.layouts.DisappearingScaffold
@@ -46,8 +47,8 @@ fun RelayGroupChatScreen(
) {
val relay = remember(relayUrl) { RelayUrlNormalizer.normalizeOrNull(relayUrl) } ?: return
val channelId = remember(id, relay) { GroupId(id, relay) }
val draft = remember(draftId) { draftId?.let { accountViewModel.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { accountViewModel.checkGetOrCreateNote(it) } }
val draft = remember(draftId) { draftId?.let { LocalCache.getNoteIfExists(it) } }
val replyTo = remember(replyToId) { replyToId?.let { LocalCache.checkGetOrCreateNote(it) } }
val selfRoute = remember(id, relayUrl) { Route.RelayGroup(id, relayUrl) }
DisappearingScaffold(
@@ -68,6 +68,7 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.buzz.BuzzAgentActivityState
import com.vitorpamplona.amethyst.commons.model.buzz.BuzzRelayDialect
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.nip29RelayGroups.RelayGroupChannel
import com.vitorpamplona.amethyst.commons.model.nip29RelayGroups.RelayGroupMembership
@@ -352,7 +353,7 @@ private fun RelayGroupMemberRow(
// Create-or-get (never a one-shot null): UsernameDisplay observes the user's
// metadata flow, so the name fills in when the kind:0 arrives instead of being
// stuck on truncated hex forever.
val user = remember(entry.pubkey) { accountViewModel.checkGetOrCreateUser(entry.pubkey) }
val user = remember(entry.pubkey) { LocalCache.checkGetOrCreateUser(entry.pubkey) }
var menuOpen by remember { mutableStateOf(false) }
var confirmRemove by remember { mutableStateOf(false) }
@@ -152,7 +152,7 @@ private fun ParentSelectorCard(
// yet), warm its single 39000, and observe it so the name/picture fill in as they arrive.
val liveParent: RelayGroupChannel? =
parentId?.let { id ->
val channel = remember(id, relay) { accountViewModel.checkGetOrCreateRelayGroupChannel(GroupId(id, relay)) }
val channel = remember(id, relay) { LocalCache.getOrCreateRelayGroupChannel(GroupId(id, relay)) }
RelayGroupCardWarmupSubscription(channel, accountViewModel.dataSources().relayGroupCardWarmup, accountViewModel)
val state by channel
.flow()
@@ -473,7 +473,7 @@ private fun pickCandidates(
relayInfo: Nip11RelayInformation,
forbidden: Set<String>,
): List<RelayGroupChannel> =
accountViewModel
LocalCache
.getRelayGroupChannelsOnRelay(relay)
.asSequence()
.filter { it.groupId.id !in forbidden }
@@ -492,11 +492,11 @@ private fun descendantIdsOf(
): Set<String> {
val result = mutableSetOf<String>()
val queue = ArrayDeque<String>()
accountViewModel.getRelayGroupChannelIfExists(GroupId(rootId, relay))?.childGroupIds()?.let { queue.addAll(it) }
LocalCache.getRelayGroupChannelIfExists(GroupId(rootId, relay))?.childGroupIds()?.let { queue.addAll(it) }
while (queue.isNotEmpty()) {
val id = queue.removeFirst()
if (!result.add(id)) continue
accountViewModel.getRelayGroupChannelIfExists(GroupId(id, relay))?.childGroupIds()?.let { queue.addAll(it) }
LocalCache.getRelayGroupChannelIfExists(GroupId(id, relay))?.childGroupIds()?.let { queue.addAll(it) }
}
return result
}
@@ -45,6 +45,7 @@ import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip29RelayGroups.RelayGroupChannel
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.relay_group_pinned_content_description
@@ -76,7 +77,7 @@ fun RelayGroupPinnedBar(
val safeIndex = index.coerceIn(0, pinnedIds.lastIndex)
val currentId = pinnedIds[safeIndex]
val note = remember(currentId) { accountViewModel.checkGetOrCreateNote(currentId) } ?: return
val note = remember(currentId) { LocalCache.checkGetOrCreateNote(currentId) } ?: return
// Fetch + observe the pinned message so its author and content fill in once it loads.
val noteState by observeNote(note, accountViewModel)
@@ -375,7 +375,7 @@ open class ChannelNewMessageViewModel :
(draftEvent as? ChannelMessageEvent)
?: (draftEvent as? LiveActivitiesChatMessageEvent)
threadedDraft?.reply()?.eventId?.let { replyId ->
replyTo.value = accountViewModel.checkGetOrCreateNote(replyId)
replyTo.value = LocalCache.checkGetOrCreateNote(replyId)
}
message.setTextAndPlaceCursorAtEnd(draftEvent.content)
@@ -1125,11 +1125,11 @@ fun LoadUser(
content: @Composable (User?) -> Unit,
) {
var user by
remember(baseUserHex) { mutableStateOf(accountViewModel.getUserIfExists(baseUserHex)) }
remember(baseUserHex) { mutableStateOf(LocalCache.getUserIfExists(baseUserHex)) }
if (user == null) {
LaunchedEffect(key1 = baseUserHex) {
user = accountViewModel.checkGetOrCreateUser(baseUserHex)
user = LocalCache.checkGetOrCreateUser(baseUserHex)
}
}
@@ -60,6 +60,7 @@ import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastStatus
import com.vitorpamplona.amethyst.commons.nip64Chess.ui.ChessBroadcastBanner
@@ -306,7 +307,7 @@ fun ChessGameScreen(
// Resolve opponent display name and avatar
val opponentUser =
remember(gameState.opponentPubkey) {
accountViewModel.checkGetOrCreateUser(gameState.opponentPubkey)
LocalCache.checkGetOrCreateUser(gameState.opponentPubkey)
}
val opponentDisplayName =
remember(gameState.opponentPubkey) {
@@ -320,7 +321,7 @@ fun ChessGameScreen(
// Resolve player display name and avatar
val playerUser =
remember(gameState.playerPubkey) {
accountViewModel.checkGetOrCreateUser(gameState.playerPubkey)
LocalCache.checkGetOrCreateUser(gameState.playerPubkey)
}
val playerDisplayName =
remember(gameState.playerPubkey) {
@@ -60,6 +60,7 @@ import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge
import com.vitorpamplona.amethyst.commons.nip64Chess.ui.ActiveGameCard
@@ -306,7 +307,7 @@ fun ChessLobbyContent(
val userPubkey = accountViewModel.account.userProfile().pubkeyHex
val currentUser =
remember(userPubkey) {
accountViewModel.checkGetOrCreateUser(userPubkey)
LocalCache.checkGetOrCreateUser(userPubkey)
}
val hasContent =
@@ -375,7 +376,7 @@ fun ChessLobbyContent(
items(activeGames.entries.toList(), key = { "active-${it.key}" }) { (gameId, state) ->
val opponent =
remember(state.opponentPubkey) {
accountViewModel.checkGetOrCreateUser(state.opponentPubkey)
LocalCache.checkGetOrCreateUser(state.opponentPubkey)
}
val displayName = opponent?.toBestDisplayName() ?: state.opponentPubkey.take(8)
ActiveGameCard(
@@ -411,7 +412,7 @@ fun ChessLobbyContent(
items(outgoingChallenges, key = { "outgoing-${it.eventId}" }) { challenge ->
val opponentUser =
remember(challenge.opponentPubkey) {
challenge.opponentPubkey?.let { accountViewModel.checkGetOrCreateUser(it) }
challenge.opponentPubkey?.let { LocalCache.checkGetOrCreateUser(it) }
}
val opponentName =
opponentUser?.toBestDisplayName()
@@ -476,7 +477,7 @@ fun ChessLobbyContent(
val displayName =
remember(challenge.challengerPubkey, challenge.challengerDisplayName) {
challenge.challengerDisplayName
?: accountViewModel.checkGetOrCreateUser(challenge.challengerPubkey)?.toBestDisplayName()
?: LocalCache.checkGetOrCreateUser(challenge.challengerPubkey)?.toBestDisplayName()
?: challenge.challengerPubkey.take(8)
}
ChallengeCard(
@@ -513,7 +514,7 @@ fun ChessLobbyContent(
val displayName =
remember(challenge.challengerPubkey, challenge.challengerDisplayName) {
challenge.challengerDisplayName
?: accountViewModel.checkGetOrCreateUser(challenge.challengerPubkey)?.toBestDisplayName()
?: LocalCache.checkGetOrCreateUser(challenge.challengerPubkey)?.toBestDisplayName()
?: challenge.challengerPubkey.take(8)
}
ChallengeCard(
@@ -587,7 +588,7 @@ fun ChessLobbyContent(
if (game.whitePubkey == userPubkey) game.blackPubkey else game.whitePubkey
val opponentUser =
remember(opponentPubkey) {
accountViewModel.checkGetOrCreateUser(opponentPubkey)
LocalCache.checkGetOrCreateUser(opponentPubkey)
}
val opponentName =
opponentUser?.toBestDisplayName()
@@ -33,6 +33,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.contact_list_screen_title
import com.vitorpamplona.amethyst.commons.resources.contact_list_screen_title_with_count
@@ -78,7 +79,7 @@ fun ContactListUsersScreen(
event
?.verifiedFollowKeySet()
?.filter { !accountViewModel.account.isHidden(it) }
?.mapNotNull { accountViewModel.checkGetOrCreateUser(it) }
?.mapNotNull { LocalCache.checkGetOrCreateUser(it) }
?.sortedByDescending { accountViewModel.account.isKnown(it.pubkeyHex) }
?.toPersistentList()
?: persistentListOf()
@@ -81,6 +81,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.EmptyTagList
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.add_a_tag
@@ -156,8 +157,8 @@ fun LongFormPostScreen(
postViewModel.init(accountViewModel)
LaunchedEffect(postViewModel, accountViewModel) {
val draft = draftId?.let { accountViewModel.getNoteIfExists(it) }
val version = versionId?.let { accountViewModel.getNoteIfExists(it) }
val draft = draftId?.let { LocalCache.getNoteIfExists(it) }
val version = versionId?.let { LocalCache.getNoteIfExists(it) }
postViewModel.load(draft, version)
if (draftId == null && versionId == null) {
postViewModel.applySignature()
@@ -44,6 +44,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.description
@@ -111,10 +112,10 @@ fun NewProductScreen(
LaunchedEffect(postViewModel, accountViewModel) {
postViewModel.reloadRelaySet()
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
quoteId?.let { accountViewModel.getNoteIfExists(it) }?.let {
quoteId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.quote(it)
}
message?.ifBlank { null }?.let {
@@ -40,6 +40,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip90DVMs.DvmHeartbeatRegistry
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.dvm_offline_banner
@@ -72,11 +73,11 @@ fun rememberDvmHeartbeatFresh(
var heartbeatNote by
remember(heartbeatAddressTag) {
mutableStateOf(accountViewModel.getNoteIfExists(heartbeatAddressTag))
mutableStateOf(LocalCache.getNoteIfExists(heartbeatAddressTag))
}
LaunchedEffect(heartbeatAddressTag) {
if (heartbeatNote == null) {
heartbeatNote = accountViewModel.checkGetOrCreateNote(heartbeatAddressTag)
heartbeatNote = LocalCache.checkGetOrCreateNote(heartbeatAddressTag)
}
}
@@ -27,9 +27,9 @@ import android.os.Bundle
import androidx.annotation.RequiresApi
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.favorites.FavoriteApp
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.tor.TorType
import com.vitorpamplona.amethyst.favorites.FavoriteAppLauncher
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.napplet.WebAppNetworkRegistry
import com.vitorpamplona.amethyst.napplethost.NappletHostContract
import com.vitorpamplona.amethyst.ui.screen.loggedIn.browser.EmbeddedWebAppController
@@ -30,7 +30,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.commons.model.ThemeType
/**
* Keeps the warm embedded tabs in sync with the app's DARK/LIGHT theme. An embed WebView resolves its
@@ -26,6 +26,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalContext
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.ui.actions.uploads.SelectedMedia
import com.vitorpamplona.amethyst.ui.navigation.navs.Nav
import com.vitorpamplona.amethyst.ui.note.nip22Comments.CommentPostViewModel
@@ -57,13 +58,13 @@ fun GeoHashPostScreen(
geohash?.let {
postViewModel.newPostFor(GeohashId(it))
}
replyId?.let { accountViewModel.getNoteIfExists(it) }?.let {
replyId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.reply(it)
}
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
quoteId?.let { accountViewModel.getNoteIfExists(it) }?.let {
quoteId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.quote(it)
}
message?.ifBlank { null }?.let {
@@ -26,6 +26,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalContext
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.ui.actions.uploads.SelectedMedia
import com.vitorpamplona.amethyst.ui.navigation.navs.Nav
import com.vitorpamplona.amethyst.ui.note.nip22Comments.CommentPostViewModel
@@ -57,13 +58,13 @@ fun HashtagPostScreen(
hashtag?.let {
postViewModel.newPostFor(HashtagId(it))
}
replyId?.let { accountViewModel.getNoteIfExists(it) }?.let {
replyId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.reply(it)
}
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
quoteId?.let { accountViewModel.getNoteIfExists(it) }?.let {
quoteId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.quote(it)
}
message?.ifBlank { null }?.let {
@@ -29,6 +29,7 @@ import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.nip30CustomEmojis.EmojiPackState.EmojiMedia
import com.vitorpamplona.amethyst.commons.model.nip30CustomEmojis.EmojiSuggestionState
import com.vitorpamplona.amethyst.commons.ui.note.creators.messagefield.IMessageField
@@ -134,8 +135,8 @@ class NewHighlightPostViewModel :
if (accountViewModel != null) {
originalNote =
when {
!sourceAddress.isNullOrBlank() -> Address.parse(sourceAddress)?.let { accountViewModel.getOrCreateAddressableNote(it) }
!sourceEventId.isNullOrBlank() -> accountViewModel.getOrCreateNote(sourceEventId)
!sourceAddress.isNullOrBlank() -> Address.parse(sourceAddress)?.let { LocalCache.getOrCreateAddressableNote(it) }
!sourceEventId.isNullOrBlank() -> LocalCache.getOrCreateNote(sourceEventId)
else -> null
}
}
@@ -81,6 +81,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.composer.AudienceSelection
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList
@@ -135,7 +137,6 @@ import com.vitorpamplona.amethyst.commons.ui.theme.SuggestionListDefaultHeightPa
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonColumn
import com.vitorpamplona.amethyst.commons.ui.theme.placeholderText
import com.vitorpamplona.amethyst.commons.ui.theme.replyModifier
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.ui.actions.StrippingFailureDialog
import com.vitorpamplona.amethyst.ui.actions.mediaServers.FileServerSelectionRow
import com.vitorpamplona.amethyst.ui.actions.uploads.MAX_VOICE_RECORD_SECONDS
@@ -217,11 +218,11 @@ fun ShortNotePostScreen(
}
LaunchedEffect(postViewModel, accountViewModel) {
val baseReplyTo = baseReplyToId?.let { accountViewModel.getNoteIfExists(it) }
val quote = quoteId?.let { accountViewModel.getNoteIfExists(it) }
val fork = forkId?.let { accountViewModel.getNoteIfExists(it) }
val version = versionId?.let { accountViewModel.getNoteIfExists(it) }
val draft = draftId?.let { accountViewModel.getNoteIfExists(it) }
val baseReplyTo = baseReplyToId?.let { LocalCache.getNoteIfExists(it) }
val quote = quoteId?.let { LocalCache.getNoteIfExists(it) }
val fork = forkId?.let { LocalCache.getNoteIfExists(it) }
val version = versionId?.let { LocalCache.getNoteIfExists(it) }
val draft = draftId?.let { LocalCache.getNoteIfExists(it) }
postViewModel.load(baseReplyTo, quote, fork, version, draft)
message?.ifBlank { null }?.let {
postViewModel.message.setTextAndPlaceCursorAtEnd(it)
@@ -35,6 +35,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
@@ -69,7 +70,6 @@ import com.vitorpamplona.amethyst.commons.ui.text.onUiThread
import com.vitorpamplona.amethyst.commons.ui.text.replaceCurrentWord
import com.vitorpamplona.amethyst.commons.ui.text.setTextAndPlaceCursorAtBeginning
import com.vitorpamplona.amethyst.model.Account
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.model.accountsCache.AccountCacheState
import com.vitorpamplona.amethyst.service.ai.WritingAssistantFactory
import com.vitorpamplona.amethyst.service.location.LocationState
@@ -1506,7 +1506,7 @@ open class ShortNotePostViewModel :
val tags = prepareETagsAsReplyTo(replyingTo, forkingFrom)
// fixes wrong tags from previous clients
tags.forEach {
val note = accountViewModel.getNoteIfExists(it.eventId)
val note = LocalCache.getNoteIfExists(it.eventId)
val ourAuthor = note?.author?.pubkeyHex
val ourHint = note?.relayHintUrl()
if (it.author == null || it.author?.isBlank() == true) {
@@ -28,6 +28,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.mediaServers.ServerName
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.error
@@ -115,7 +116,7 @@ class VoiceReplyViewModel : ViewModel() {
duration: Int,
amplitudesJson: String,
) {
replyToNote = accountViewModel.getNoteIfExists(replyToNoteId)
replyToNote = LocalCache.getNoteIfExists(replyToNoteId)
val amplitudes =
try {
@@ -293,7 +293,7 @@ open class NestNewMessageViewModel :
if (draftEvent as? LiveActivitiesChatMessageEvent != null) {
val replyId = draftEvent.reply()?.eventId
if (replyId != null) {
replyTo.value = accountViewModel.checkGetOrCreateNote(replyId)
replyTo.value = LocalCache.checkGetOrCreateNote(replyId)
}
}
@@ -82,12 +82,12 @@ import com.vitorpamplona.amethyst.commons.resources.nest_promote_speaker
import com.vitorpamplona.amethyst.commons.resources.nest_toast_host_action_failed_template_null
import com.vitorpamplona.amethyst.commons.resources.nest_toast_host_action_failed_title
import com.vitorpamplona.amethyst.commons.resources.no_wallet_found
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.viewmodels.NestViewModel
import com.vitorpamplona.amethyst.commons.viewmodels.RoomSpeakerCatalog
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.observeUserInfo
import com.vitorpamplona.amethyst.ui.MainActivity
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.ui.note.UsernameDisplay
import com.vitorpamplona.amethyst.ui.note.ZapCustomDialog
import com.vitorpamplona.amethyst.ui.note.payViaIntent
@@ -90,13 +90,13 @@ import com.vitorpamplona.amethyst.commons.resources.nest_reconnecting
import com.vitorpamplona.amethyst.commons.resources.nest_talk
import com.vitorpamplona.amethyst.commons.resources.no_wallet_found
import com.vitorpamplona.amethyst.commons.resources.zap_description
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.viewmodels.BroadcastUiState
import com.vitorpamplona.amethyst.commons.viewmodels.ConnectionUiState
import com.vitorpamplona.amethyst.commons.viewmodels.NestUiState
import com.vitorpamplona.amethyst.commons.viewmodels.NestViewModel
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.ui.note.ZapAmountChoicePopup
import com.vitorpamplona.amethyst.ui.note.ZapCustomDialog
import com.vitorpamplona.amethyst.ui.note.payViaIntent
@@ -55,6 +55,7 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.AddressableNote
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.accounts_found
@@ -85,7 +86,7 @@ fun ImportFollowListPickFollowsScreen(
) {
val contactListNote =
remember(userHex) {
accountViewModel.getOrCreateAddressableNote(ContactListEvent.createAddress(userHex))
LocalCache.getOrCreateAddressableNote(ContactListEvent.createAddress(userHex))
}
Scaffold(
@@ -137,7 +138,7 @@ fun DisplayFollowList(
?.unverifiedFollowKeySet()
?.toSet()
?.mapNotNull {
accountViewModel.checkGetOrCreateUser(it)
LocalCache.checkGetOrCreateUser(it)
}?.toPersistentList()
}
@@ -32,6 +32,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.notification_tab_everyone
@@ -44,7 +45,6 @@ import com.vitorpamplona.amethyst.commons.ui.feeds.rememberForeverPagerState
import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.TabRowHeight
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.ui.components.SelectNotificationProvider
import com.vitorpamplona.amethyst.ui.feeds.WatchScrollToTop
import com.vitorpamplona.amethyst.ui.layouts.DisappearingScaffold
@@ -53,6 +53,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.messages_new_message_to
@@ -128,10 +129,10 @@ fun NewPublicMessageScreen(
to?.let {
postViewModel.load(it)
}
replyId?.let { accountViewModel.getNoteIfExists(it) }?.let {
replyId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.reply(it)
}
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
}
@@ -91,10 +91,10 @@ private fun PodcastAuthorRow(
accountViewModel: AccountViewModel,
nav: INav,
) {
var user by remember(author.pubKey) { mutableStateOf(accountViewModel.getUserIfExists(author.pubKey)) }
var user by remember(author.pubKey) { mutableStateOf(LocalCache.getUserIfExists(author.pubKey)) }
if (user == null) {
LaunchedEffect(author.pubKey) {
user = accountViewModel.checkGetOrCreateUser(author.pubKey)
user = LocalCache.checkGetOrCreateUser(author.pubKey)
}
}
@@ -25,6 +25,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.ui.navigation.navs.Nav
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.home.NewPostScreenInner
@@ -44,7 +45,7 @@ fun PollPostScreen(
postViewModel.init(accountViewModel)
LaunchedEffect(postViewModel, accountViewModel) {
val draft = draftId?.let { accountViewModel.getNoteIfExists(it) }
val draft = draftId?.let { LocalCache.getNoteIfExists(it) }
postViewModel.load(null, null, null, null, draft)
message?.ifBlank { null }?.let {
postViewModel.message.setTextAndPlaceCursorAtEnd(it)
@@ -107,8 +107,8 @@ fun DisplayBadges(
val oldDesign = AcceptedBadgeSetEvent.createAddress(baseUser.pubkeyHex)
val newDesign = ProfileBadgesEvent.createAddress(baseUser.pubkeyHex)
val oldNote = accountViewModel.getOrCreateAddressableNote(oldDesign)
val newNote = accountViewModel.getOrCreateAddressableNote(newDesign)
val oldNote = LocalCache.getOrCreateAddressableNote(oldDesign)
val newNote = LocalCache.getOrCreateAddressableNote(newDesign)
WatchAndRenderBadgeList(baseUser, oldNote, newNote, accountViewModel, nav)
}
@@ -73,6 +73,14 @@ import com.vitorpamplona.amethyst.R
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.AccentColorType
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.ConnectivityType
import com.vitorpamplona.amethyst.commons.model.FeatureSetType
import com.vitorpamplona.amethyst.commons.model.FontFamilyType
import com.vitorpamplona.amethyst.commons.model.FontSizeType
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.accent_color
import com.vitorpamplona.amethyst.commons.resources.accent_color_description
@@ -122,14 +130,6 @@ import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonRow
import com.vitorpamplona.amethyst.commons.ui.theme.contentColorOnAccent
import com.vitorpamplona.amethyst.commons.ui.theme.isLight
import com.vitorpamplona.amethyst.model.AccentColorType
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.model.ConnectivityType
import com.vitorpamplona.amethyst.model.FeatureSetType
import com.vitorpamplona.amethyst.model.FontFamilyType
import com.vitorpamplona.amethyst.model.FontSizeType
import com.vitorpamplona.amethyst.model.ThemeType
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.theme.previewColor
import com.vitorpamplona.amethyst.ui.theme.toFontFamily
@@ -45,6 +45,8 @@ import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.add_client_tag_explainer
import com.vitorpamplona.amethyst.commons.resources.add_client_tag_title
@@ -96,8 +98,6 @@ import com.vitorpamplona.amethyst.commons.ui.navigation.topbars.TopBarWithBackBu
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonColumn
import com.vitorpamplona.amethyst.model.AccountPoWPreferences
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.service.ai.WritingAssistantFactory
import com.vitorpamplona.amethyst.service.pow.deviceHashesPerSecond
import com.vitorpamplona.amethyst.service.pow.loadApproxDuration
@@ -36,6 +36,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.HomeFeedType
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.conversations
import com.vitorpamplona.amethyst.commons.resources.home_content_type_articles
@@ -72,7 +73,6 @@ import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.navigation.topbars.TopBarWithBackButton
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonRow
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel
import org.jetbrains.compose.resources.StringResource
@@ -34,6 +34,8 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.ProfileGalleryType
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.gallery_style
import com.vitorpamplona.amethyst.commons.resources.gallery_style_description
@@ -50,8 +52,6 @@ import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.navigation.topbars.TopBarWithBackButton
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonRow
import com.vitorpamplona.amethyst.model.ProfileGalleryType
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel
@@ -38,7 +38,9 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.WarningType
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.model.parseWarningType
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.blocked_users
import com.vitorpamplona.amethyst.commons.resources.filter_spam_from_strangers_explainer
@@ -65,8 +67,6 @@ import com.vitorpamplona.amethyst.commons.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.commons.ui.navigation.topbars.TopBarWithBackButton
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.commons.ui.theme.ThemeComparisonColumn
import com.vitorpamplona.amethyst.model.WarningType
import com.vitorpamplona.amethyst.model.parseWarningType
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel
@@ -26,6 +26,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalContext
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import com.vitorpamplona.amethyst.commons.model.cache.LocalCache
import com.vitorpamplona.amethyst.ui.actions.uploads.SelectedMedia
import com.vitorpamplona.amethyst.ui.navigation.navs.Nav
import com.vitorpamplona.amethyst.ui.note.nip22Comments.CommentPostViewModel
@@ -59,13 +60,13 @@ fun UrlPostScreen(
postViewModel.newPostFor(UrlId(normalizedUrl))
}
}
replyId?.let { accountViewModel.getNoteIfExists(it) }?.let {
replyId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.reply(it)
}
draftId?.let { accountViewModel.getNoteIfExists(it) }?.let {
draftId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.editFromDraft(it)
}
quoteId?.let { accountViewModel.getNoteIfExists(it) }?.let {
quoteId?.let { LocalCache.getNoteIfExists(it) }?.let {
postViewModel.quote(it)
}
message?.ifBlank { null }?.let {
@@ -60,6 +60,7 @@ import com.vitorpamplona.amethyst.commons.fitness.TrainingLog
import com.vitorpamplona.amethyst.commons.fitness.WorkoutOrigin
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.BooleanType
import com.vitorpamplona.amethyst.commons.model.navigation.Route
import com.vitorpamplona.amethyst.commons.resources.Res
import com.vitorpamplona.amethyst.commons.resources.workout_from_health_connect
@@ -71,7 +72,6 @@ import com.vitorpamplona.amethyst.commons.resources.workout_suggestion_connect_t
import com.vitorpamplona.amethyst.commons.resources.workout_suggestion_distance_km
import com.vitorpamplona.amethyst.commons.ui.pluralStringRes
import com.vitorpamplona.amethyst.commons.ui.stringRes
import com.vitorpamplona.amethyst.model.BooleanType
import com.vitorpamplona.amethyst.service.workouts.health.HealthConnectManager
import com.vitorpamplona.amethyst.service.workouts.health.publishedWorkoutsOf
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
@@ -44,8 +44,15 @@ import com.patrykandpatrick.vico.compose.common.VicoTheme
import com.patrykandpatrick.vico.compose.common.VicoTheme.CandlestickCartesianLayerColors
import com.vitorpamplona.amethyst.Amethyst
import com.vitorpamplona.amethyst.commons.icons.symbols.ProvideAppIcons
import com.vitorpamplona.amethyst.commons.model.AccentColorType
import com.vitorpamplona.amethyst.commons.model.FontFamilyType
import com.vitorpamplona.amethyst.commons.model.FontSizeType
import com.vitorpamplona.amethyst.commons.model.ThemeType
import com.vitorpamplona.amethyst.commons.ui.components.LocalAnimationsEnabled
import com.vitorpamplona.amethyst.commons.ui.components.LocalProfilePictureCache
import com.vitorpamplona.amethyst.commons.ui.screen.DisplaySettings
import com.vitorpamplona.amethyst.commons.ui.screen.LocalDisplaySettings
import com.vitorpamplona.amethyst.commons.ui.screen.collectDisplaySettings
import com.vitorpamplona.amethyst.commons.ui.theme.AccentBlueDark
import com.vitorpamplona.amethyst.commons.ui.theme.AccentBlueLight
import com.vitorpamplona.amethyst.commons.ui.theme.AccentGreenDark
@@ -66,11 +73,6 @@ import com.vitorpamplona.amethyst.commons.ui.theme.amethystLightColorScheme
import com.vitorpamplona.amethyst.commons.ui.theme.isLight
import com.vitorpamplona.amethyst.commons.ui.theme.transparentBackground
import com.vitorpamplona.amethyst.commons.ui.theme.withFontFamily
import com.vitorpamplona.amethyst.model.AccentColorType
import com.vitorpamplona.amethyst.model.FeatureSetType
import com.vitorpamplona.amethyst.model.FontFamilyType
import com.vitorpamplona.amethyst.model.FontSizeType
import com.vitorpamplona.amethyst.model.ThemeType
// The accent color (primary/secondary/tertiary) is user-selectable in Settings -> Accent Color.
// Purple keeps the original Amethyst look (purple primary + teal secondary). Every other accent
@@ -148,9 +150,9 @@ fun AmethystTheme(content: @Composable () -> Unit) {
val accentColor by uiPrefs.accentColor.collectAsStateWithLifecycle()
val fontFamily by uiPrefs.fontFamily.collectAsStateWithLifecycle()
val fontSize by uiPrefs.fontSize.collectAsStateWithLifecycle()
val featureSet by uiPrefs.featureSet.collectAsStateWithLifecycle()
val displaySettings = collectDisplaySettings(Amethyst.instance.uiState)
AmethystTheme(theme, accentColor, fontFamily, fontSize, animationsEnabled = featureSet != FeatureSetType.PERFORMANCE, content = content)
AmethystTheme(theme, accentColor, fontFamily, fontSize, displaySettings, content)
}
@Composable
@@ -159,7 +161,7 @@ fun AmethystTheme(
accentColor: AccentColorType = AccentColorType.PURPLE,
fontFamily: FontFamilyType = FontFamilyType.SYSTEM,
fontSize: FontSizeType = FontSizeType.NORMAL,
animationsEnabled: Boolean = true,
displaySettings: DisplaySettings = DisplaySettings(),
content: @Composable () -> Unit,
) {
// Deliberately no UiModeManager.nightMode write: changing the device night mode needs
@@ -196,8 +198,9 @@ fun AmethystTheme(
LocalDensity provides scaledDensity,
// ImageLoaderSetup registers the avatar thumbnail cache and the local Blossom bridge.
LocalProfilePictureCache provides true,
LocalDisplaySettings provides displaySettings,
// Performance mode turns decorative animations (crossfades) off app-wide.
LocalAnimationsEnabled provides animationsEnabled,
LocalAnimationsEnabled provides !displaySettings.performanceMode,
LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(fontFamily = resolvedFontFamily)),
content = content,
)
@@ -29,7 +29,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.isGranted
import com.google.accompanist.permissions.rememberPermissionState
import com.vitorpamplona.amethyst.model.UiSettingsFlow
import com.vitorpamplona.amethyst.commons.model.UiSettingsFlow
@OptIn(ExperimentalPermissionsApi::class)
@Composable
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.model
package com.vitorpamplona.amethyst.commons.model
import androidx.compose.runtime.Stable
import com.vitorpamplona.amethyst.commons.resources.Res
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.model
package com.vitorpamplona.amethyst.commons.model
import androidx.compose.runtime.Stable
import kotlinx.coroutines.flow.Flow
@@ -30,6 +30,7 @@ import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.Dp
import com.vitorpamplona.amethyst.commons.ui.screen.LocalDisplaySettings
/**
* Wrapper class for profile picture URLs that signals Coil to use the thumbnail
@@ -58,7 +59,8 @@ val LocalProfilePictureCache = staticCompositionLocalOf { false }
* @param size Size of the avatar (both width and height)
* @param modifier Additional modifiers to apply
* @param contentDescription Accessibility description
* @param loadProfilePicture Whether to load the profile picture (false = show robohash only)
* @param loadProfilePicture Whether to load the profile picture (false = show robohash only).
* Defaults to the user's display settings ([LocalDisplaySettings]), as do the next two.
* @param loadRobohash Whether to generate robohash (false = show generic icon)
* @param autoPlayGif Whether animated (GIF/AVIF) pictures play. Only Android can animate them;
* desktop shows their first frame either way.
@@ -74,9 +76,9 @@ fun UserAvatar(
size: Dp,
modifier: Modifier = Modifier,
contentDescription: String? = null,
loadProfilePicture: Boolean = true,
loadRobohash: Boolean = true,
autoPlayGif: Boolean = true,
loadProfilePicture: Boolean = LocalDisplaySettings.current.showProfilePictures,
loadRobohash: Boolean = LocalDisplaySettings.current.loadRobohash,
autoPlayGif: Boolean = LocalDisplaySettings.current.autoPlayVideos,
badge: @Composable (BoxScope.() -> Unit)? = null,
) {
if (badge != null) {
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.ui.components.toasts
package com.vitorpamplona.amethyst.commons.ui.components.toasts
import androidx.compose.runtime.Immutable
import org.jetbrains.compose.resources.StringResource
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.ui.components.toasts
package com.vitorpamplona.amethyst.commons.ui.components.toasts
import androidx.compose.runtime.Immutable
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.ui.components.toasts
package com.vitorpamplona.amethyst.commons.ui.components.toasts
import androidx.compose.runtime.Immutable
import org.jetbrains.compose.resources.StringResource
@@ -18,12 +18,12 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.ui.components.toasts
package com.vitorpamplona.amethyst.commons.ui.components.toasts
import androidx.compose.runtime.Stable
import com.vitorpamplona.amethyst.commons.model.User
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.ui.components.toasts.multiline.UserBasedErrorMessage
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.MultiErrorToastMsg
import com.vitorpamplona.amethyst.commons.ui.components.toasts.multiline.UserBasedErrorMessage
import kotlinx.coroutines.flow.MutableStateFlow
import org.jetbrains.compose.resources.StringResource
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.ui.components.toasts
package com.vitorpamplona.amethyst.commons.ui.components.toasts
import androidx.compose.runtime.Immutable

Some files were not shown because too many files have changed in this diff Show More