Skip to content

Commit

Permalink
🚑 Fix crash when no Mastodon account is linked (#375)
Browse files Browse the repository at this point in the history
fixes #374
  • Loading branch information
jheubuch authored Jul 6, 2024
1 parent 756e77d commit 74ba931
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ fun CheckIn(
) }

val mastodonEmojis = remember { MastodonEmojis.getInstance(context) }
val instanceEmojis by remember { derivedStateOf { mastodonEmojis.emojis[URL(loggedInUser?.mastodonUrl).host] ?: listOf() } }
val instanceEmojis by remember { derivedStateOf {
if (loggedInUser?.mastodonUrl?.isNotBlank() == true) {
mastodonEmojis.emojis[URL(loggedInUser?.mastodonUrl).host] ?: listOf()
} else {
listOf()
}
} }
val bottomSearchViewModel: BottomSearchViewModel = viewModel()

var enableTrwlCheckIn by rememberSaveable { mutableStateOf(secureStorage.getObject(SharedValues.SS_TRWL_AUTO_LOGIN, Boolean::class.java) ?: true) }
Expand Down

0 comments on commit 74ba931

Please sign in to comment.