mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3692 Space settings | Fix | Different number of members on Space settings screen and Members screen (#2450)
This commit is contained in:
parent
7f98cdfaaa
commit
e685e4ea53
4 changed files with 30 additions and 8 deletions
|
@ -12,9 +12,9 @@ fun DecryptedPushContent.Message.formatNotificationBody(attachmentText: String):
|
|||
val rawText = text.trim()
|
||||
return when {
|
||||
hasAttachments && rawText.isNotEmpty() ->
|
||||
"$rawText \uD83D\uDCCE$attachmentText"
|
||||
"$rawText \uD83D\uDCCE $attachmentText"
|
||||
hasAttachments ->
|
||||
"\uD83D\uDCCE$attachmentText"
|
||||
"\uD83D\uDCCE $attachmentText"
|
||||
else ->
|
||||
rawText
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.anytypeio.anytype.analytics.base.Analytics
|
|||
import com.anytypeio.anytype.core_utils.di.scope.PerScreen
|
||||
import com.anytypeio.anytype.device.share.debug.DebugSpaceDeviceFileContentSaver
|
||||
import com.anytypeio.anytype.di.common.ComponentDependencies
|
||||
import com.anytypeio.anytype.domain.auth.interactor.GetAccount
|
||||
import com.anytypeio.anytype.domain.auth.repo.AuthRepository
|
||||
import com.anytypeio.anytype.domain.base.AppCoroutineDispatchers
|
||||
import com.anytypeio.anytype.domain.block.repo.BlockRepository
|
||||
|
@ -89,6 +90,14 @@ object SpaceSettingsModule {
|
|||
repo = repository
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
@Provides
|
||||
@PerScreen
|
||||
fun provideGetAccountUseCase(
|
||||
repo: AuthRepository,
|
||||
dispatchers: AppCoroutineDispatchers
|
||||
): GetAccount = GetAccount(repo = repo, dispatcher = dispatchers)
|
||||
|
||||
@Module
|
||||
interface Bindings {
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@ class NotificationExtensionsTest {
|
|||
@Test
|
||||
fun `formatNotificationBody appends attachment indicator when only attachments present`() {
|
||||
val message = createMessage(text = "", hasAttachments = true)
|
||||
assertEquals("\uD83D\uDCCEattachment", message.formatNotificationBody("attachment"))
|
||||
assertEquals("\uD83D\uDCCE attachment", message.formatNotificationBody("attachment"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `formatNotificationBody appends attachment indicator after text when both present`() {
|
||||
val message = createMessage(text = "Hello world", hasAttachments = true)
|
||||
assertEquals("Hello world \uD83D\uDCCEattachment", message.formatNotificationBody("attachment"))
|
||||
assertEquals("Hello world \uD83D\uDCCE attachment", message.formatNotificationBody("attachment"))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue