diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index a9de6b64d..d32ca043b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -601,7 +601,7 @@ class Account( url: String, method: String, body: ByteArray? = null, - ): HTTPAuthorizationEvent? = signer.sign(HTTPAuthorizationEvent.build(url, method, body)) + ): HTTPAuthorizationEvent = signer.sign(HTTPAuthorizationEvent.build(url, method, body)) suspend fun createBlossomUploadAuth( hash: HexKey, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt index 19ba65b5e..aa694f42d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt @@ -218,7 +218,7 @@ class User( fun transientFollowCount(): Int? = latestContactList?.unverifiedFollowKeySet()?.size - suspend fun transientFollowerCount(): Int = LocalCache.users.count { _, it -> it.latestContactList?.isTaggedUser(pubkeyHex) ?: false } + fun transientFollowerCount(): Int = LocalCache.users.count { _, it -> it.latestContactList?.isTaggedUser(pubkeyHex) ?: false } fun reportsOrNull(): UserReportCache? = reports diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip51Lists/peopleList/FollowListsState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip51Lists/peopleList/FollowListsState.kt index 29b5d1f0c..59ab65117 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip51Lists/peopleList/FollowListsState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip51Lists/peopleList/FollowListsState.kt @@ -80,14 +80,14 @@ class FollowListsState( .map { existingPeopleListNotes() } .onStart { emit(existingPeopleListNotes()) } .flowOn(Dispatchers.IO) - .stateIn(scope, SharingStarted.Companion.Eagerly, emptyList()) + .stateIn(scope, SharingStarted.Eagerly, emptyList()) val followListsEventIds = followListNotes .map { it.eventIdSet() } .onStart { emit(followListNotes.value.eventIdSet()) } .flowOn(Dispatchers.IO) - .stateIn(scope, SharingStarted.Companion.Eagerly, emptySet()) + .stateIn(scope, SharingStarted.Eagerly, emptySet()) @OptIn(ExperimentalCoroutinesApi::class) val latestLists: StateFlow> = @@ -104,7 +104,7 @@ class FollowListsState( .map { it.mapToUserIdSet() } .onStart { emit(latestLists.value.mapToUserIdSet()) } .flowOn(Dispatchers.IO) - .stateIn(scope, SharingStarted.Companion.Eagerly, emptySet()) + .stateIn(scope, SharingStarted.Eagerly, emptySet()) fun FollowListEvent.toUI() = PeopleList( @@ -123,7 +123,7 @@ class FollowListsState( .map { it.toUI() } .onStart { emit(latestLists.value.toUI()) } .flowOn(Dispatchers.IO) - .stateIn(scope, SharingStarted.Companion.Eagerly, emptyList()) + .stateIn(scope, SharingStarted.Eagerly, emptyList()) fun List.select(dTag: String) = this.firstOrNull { @@ -139,7 +139,7 @@ class FollowListsState( fun isUserInFollowSets(user: User): Boolean = allPeopleListProfiles.value.contains(user.pubkeyHex) - fun DeletionEvent.hasDeletedAnyFollowList() = deleteAddressesWithKind(FollowListEvent.Companion.KIND) || deletesAnyEventIn(followListsEventIds.value) + fun DeletionEvent.hasDeletedAnyFollowList() = deleteAddressesWithKind(FollowListEvent.KIND) || deletesAnyEventIn(followListsEventIds.value) fun hasItemInNoteList(notes: Set): Boolean = notes.anyNotNullEvent { event -> diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt index deb6f870d..6d2d01c4f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt @@ -39,7 +39,6 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment.Companion.CenterVertically import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color @@ -109,13 +108,13 @@ fun ChannelNamePreview() { SlimListItem( headlineContent = { - Row(verticalAlignment = Alignment.CenterVertically) { + Row(verticalAlignment = CenterVertically) { Text("This is my author", Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { - Row(verticalAlignment = Alignment.CenterVertically) { + Row(verticalAlignment = CenterVertically) { Text("This is a message from this person", Modifier.weight(1f)) Spacer(modifier = Height4dpModifier) NewItemsBubble() @@ -135,13 +134,13 @@ fun ChannelNamePreview() { ListItem( headlineContent = { - Row(verticalAlignment = Alignment.CenterVertically) { + Row(verticalAlignment = CenterVertically) { Text("This is my author", Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { - Row(verticalAlignment = Alignment.CenterVertically) { + Row(verticalAlignment = CenterVertically) { Text("This is a message from this person", Modifier.weight(1f)) Spacer(modifier = Height4dpModifier) NewItemsBubble() @@ -507,7 +506,7 @@ private class ListItemMeasurePolicy : MultiContentMeasurePolicy { } } -private fun IntrinsicMeasureScope.calculateWidth( +private fun calculateWidth( leadingWidth: Int, trailingWidth: Int, headlineWidth: Int, @@ -644,7 +643,7 @@ private value class ListItemType private constructor( /** Three line list item */ val ThreeLine = ListItemType(3) - internal operator fun invoke( + operator fun invoke( hasOverline: Boolean, hasSupporting: Boolean, isSupportingMultiline: Boolean,