Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3453014
feat: Add the contact card entry point in the account list
Elouan1411 Jul 7, 2026
adb884e
feat: Depend on the reusable contact card module
Elouan1411 Jul 7, 2026
8985a25
feat: Add UI to QR code icon
Elouan1411 Jul 7, 2026
480dabc
feat: Pass userId to core
Elouan1411 Jul 14, 2026
63187e4
feat: Keep local value for card
Elouan1411 Jul 14, 2026
4fc4217
chore: Update Core ref
Elouan1411 Jul 15, 2026
ccc88f0
refactor: Create a fragment in the app that integrates Core Compose a…
Elouan1411 Jul 16, 2026
b0a22a9
feat: Add new design for switch account bottom sheet
Elouan1411 Jul 16, 2026
bc2c472
feat: Add animation
Elouan1411 Jul 16, 2026
50c0dfb
fix: Correct crash for no_valid_mailbox
Elouan1411 Jul 16, 2026
067f54c
refactor: Rename icon
Elouan1411 Jul 16, 2026
65c6a83
feat: Inject descriptionAlertDialog for core
Elouan1411 Jul 16, 2026
5d60413
feat: Add mail top bar
Elouan1411 Jul 16, 2026
50c0e28
fix: Correct string
Elouan1411 Jul 16, 2026
5684b0d
fix: Display background only when multiple accounts
Elouan1411 Jul 16, 2026
cea6881
fix: Use MailTheme instead of MaterialThemeFromXml
Elouan1411 Jul 17, 2026
9a64dbe
feat: Add mail theme
Elouan1411 Jul 17, 2026
8500769
feat: Update TopAppBar
Elouan1411 Jul 17, 2026
7e2c462
fix: Correct Copilot review
Elouan1411 Jul 17, 2026
238c623
fix: Correct navigation
Elouan1411 Jul 20, 2026
4a1ddc1
feat: Add preview for topBar
Elouan1411 Jul 20, 2026
3af8072
refactor: Clean code
Elouan1411 Jul 20, 2026
c58578a
feat: use DescriptionAlertDialog for validation errors
Elouan1411 Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core
Submodule Core updated 64 files
+1 −0 Auth/build.gradle.kts
+171 −0 Auth/schemas/com.infomaniak.core.auth.room.UserDatabase/9.json
+9 −0 Auth/src/main/kotlin/com/infomaniak/core/auth/BaseCredentialManager.kt
+0 −2 Auth/src/main/kotlin/com/infomaniak/core/auth/CredentialManager.kt
+130 −0 Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/Card.kt
+2 −0 Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/User.kt
+14 −1 Auth/src/main/kotlin/com/infomaniak/core/auth/room/UserDatabase.kt
+1 −1 Network/build.gradle.kts
+37 −0 Ui/Compose/ContactCard/build.gradle.kts
+16 −0 Ui/Compose/ContactCard/src/main/AndroidManifest.xml
+44 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardDefaults.kt
+22 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardFileProvider.kt
+349 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardScreen.kt
+94 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardShareExt.kt
+23 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardTopBarState.kt
+221 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/ContactCardViewModel.kt
+91 −0 ...mpose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/BottomSheetAction.kt
+21 −0 ...se/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/ContactCardConstants.kt
+54 −0 ...mpose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/ContactCardTopBar.kt
+87 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/ContactInfoRows.kt
+105 −0 ...ompose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/ContactVCardBloc.kt
+62 −0 ...ard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/DefaultDeleteConfirmationDialog.kt
+57 −0 ...ctCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/DefaultValidationErrorDialog.kt
+243 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/EditorContent.kt
+77 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/EditorField.kt
+64 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/EditorTopBar.kt
+44 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/FieldDivider.kt
+90 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/LinksRow.kt
+44 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/LoadingContent.kt
+150 −0 ...mpose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/OnboardingContent.kt
+92 −0 ...ntactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/PreviewActionsBottomSheet.kt
+86 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/PreviewContent.kt
+58 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/PreviewData.kt
+70 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/PreviewTopBar.kt
+155 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/QrCodeHeader.kt
+69 −0 Ui/Compose/ContactCard/src/main/kotlin/com/infomaniak/core/ui/compose/contactcard/component/SectionCard.kt
+80 −0 Ui/Compose/ContactCard/src/main/res/drawable-night/onboarding_vcard.xml
+28 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_back_wave.xml
+37 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_bin.xml
+10 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_check.xml
+37 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_cross.xml
+26 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_facebook.xml
+26 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_instagram.xml
+26 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_link.xml
+26 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_linkedin.xml
+27 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_pencil.xml
+30 −0 Ui/Compose/ContactCard/src/main/res/drawable/ic_x.xml
+97 −0 Ui/Compose/ContactCard/src/main/res/drawable/onboarding_vcard.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-da/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-de/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-el/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-es/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-fi/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-fr/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-it/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-nb/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-nl/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-pl/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-pt/strings.xml
+35 −0 Ui/Compose/ContactCard/src/main/res/values-sv/strings.xml
+52 −0 Ui/Compose/ContactCard/src/main/res/values/strings.xml
+6 −0 Ui/Compose/ContactCard/src/main/res/xml/contact_card_paths.xml
+5 −0 gradle/core.versions.toml
+1 −0 settings.gradle.kts
76 changes: 39 additions & 37 deletions LICENSES.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
# Open Source Licenses

Infomaniak Mail for Android includes the following notable open source libraries (runtime dependencies; test-only dependencies are excluded). This list may not be exhaustive.
Infomaniak Mail for Android includes the following notable open source libraries (runtime dependencies; test-only dependencies are
excluded). This list may not be exhaustive.

| Library | License |
|---------|---------|
| [AndroidX Activity Compose](https://developer.android.com/jetpack/androidx/releases/activity) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX AppCompat](https://developer.android.com/jetpack/androidx/releases/appcompat) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Concurrent Futures](https://developer.android.com/jetpack/androidx/releases/concurrent) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Core KTX](https://developer.android.com/jetpack/androidx/releases/core) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX DataStore Preferences](https://developer.android.com/jetpack/androidx/releases/datastore) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Emoji2](https://developer.android.com/jetpack/androidx/releases/emoji2) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Lifecycle](https://developer.android.com/jetpack/androidx/releases/lifecycle) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Navigation](https://developer.android.com/jetpack/androidx/releases/navigation) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX RecyclerView](https://developer.android.com/jetpack/androidx/releases/recyclerview) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Room](https://developer.android.com/jetpack/androidx/releases/room) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX WebKit](https://developer.android.com/jetpack/androidx/releases/webkit) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Work Runtime](https://developer.android.com/jetpack/androidx/releases/work) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Coil](https://github.com/coil-kt/coil) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Dagger Hilt](https://dagger.dev/hilt/) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [DragDropSwipe RecyclerView](https://github.com/ernestoyaquello/DragDropSwipeRecyclerview) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) _(standard flavor only)_ | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [FlexboxLayout](https://github.com/google/flexbox-layout) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Material Components for Android](https://github.com/material-components/material-components-android) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play App Update](https://developer.android.com/guide/playcore/in-app-updates) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play Review](https://developer.android.com/guide/playcore/in-app-review) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play Services](https://developers.google.com/android/guides/overview) _(standard flavor only)_ | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Infomaniak Rich HTML Editor](https://github.com/Infomaniak/android-rich-html-editor) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Jetpack Compose](https://developer.android.com/jetpack/compose) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlin Standard Library](https://kotlinlang.org/) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlinx Coroutines](https://github.com/Kotlin/kotlinx.coroutines) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Lottie](https://github.com/airbnb/lottie-android) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Matomo SDK for Android](https://github.com/matomo-org/matomo-sdk-android) | [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) |
| [OkHttp](https://github.com/square/okhttp) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Okio](https://github.com/square/okio) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Realm Kotlin](https://github.com/realm/realm-kotlin) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Sentry Android SDK](https://github.com/getsentry/sentry-java) | [MIT License](https://opensource.org/licenses/MIT) |
| [Splitties](https://github.com/LouisCAD/Splitties) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [ViewPager Dots Indicator](https://github.com/tommybuonomo/dotsindicator) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| Library | License |
|--------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| [AndroidX Activity Compose](https://developer.android.com/jetpack/androidx/releases/activity) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX AppCompat](https://developer.android.com/jetpack/androidx/releases/appcompat) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Concurrent Futures](https://developer.android.com/jetpack/androidx/releases/concurrent) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Core KTX](https://developer.android.com/jetpack/androidx/releases/core) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX DataStore Preferences](https://developer.android.com/jetpack/androidx/releases/datastore) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Emoji2](https://developer.android.com/jetpack/androidx/releases/emoji2) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Lifecycle](https://developer.android.com/jetpack/androidx/releases/lifecycle) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Navigation](https://developer.android.com/jetpack/androidx/releases/navigation) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX RecyclerView](https://developer.android.com/jetpack/androidx/releases/recyclerview) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Room](https://developer.android.com/jetpack/androidx/releases/room) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX WebKit](https://developer.android.com/jetpack/androidx/releases/webkit) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [AndroidX Work Runtime](https://developer.android.com/jetpack/androidx/releases/work) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Coil](https://github.com/coil-kt/coil) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Dagger Hilt](https://dagger.dev/hilt/) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [DragDropSwipe RecyclerView](https://github.com/ernestoyaquello/DragDropSwipeRecyclerview) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) _(standard flavor only)_ | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [FlexboxLayout](https://github.com/google/flexbox-layout) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Material Components for Android](https://github.com/material-components/material-components-android) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play App Update](https://developer.android.com/guide/playcore/in-app-updates) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play Review](https://developer.android.com/guide/playcore/in-app-review) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Google Play Services](https://developers.google.com/android/guides/overview) _(standard flavor only)_ | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Infomaniak Rich HTML Editor](https://github.com/Infomaniak/android-rich-html-editor) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Jetpack Compose](https://developer.android.com/jetpack/compose) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlin Standard Library](https://kotlinlang.org/) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlinx Coroutines](https://github.com/Kotlin/kotlinx.coroutines) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Lottie](https://github.com/airbnb/lottie-android) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Matomo SDK for Android](https://github.com/matomo-org/matomo-sdk-android) | [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) |
| [OkHttp](https://github.com/square/okhttp) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Okio](https://github.com/square/okio) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [QRose](https://github.com/alexzhirkevich/qrose) | [MIT License](https://opensource.org/licenses/MIT) |
| [Realm Kotlin](https://github.com/realm/realm-kotlin) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [Sentry Android SDK](https://github.com/getsentry/sentry-java) | [MIT License](https://opensource.org/licenses/MIT) |
| [Splitties](https://github.com/LouisCAD/Splitties) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| [ViewPager Dots Indicator](https://github.com/tommybuonomo/dotsindicator) | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ dependencies {
implementation(core.infomaniak.core.sentry)
implementation(core.infomaniak.core.twofactorauth.back.withuserdb)
implementation(core.infomaniak.core.twofactorauth.front)
implementation(core.infomaniak.core.ui.compose.contactcard)
Comment thread
Elouan1411 marked this conversation as resolved.
Comment thread
Elouan1411 marked this conversation as resolved.
implementation(core.infomaniak.core.ui)
implementation(core.infomaniak.core.ui.compose.basicbutton)
implementation(core.infomaniak.core.ui.compose.basics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.activityViewModels
import com.infomaniak.core.fragmentnavigation.safelyNavigate
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.navArgs
import com.infomaniak.core.legacy.utils.context
import com.infomaniak.core.legacy.utils.safeBinding
import com.infomaniak.mail.MatomoMail.MatomoName
Expand Down Expand Up @@ -69,20 +71,28 @@ class AccountBottomSheetDialog : EdgeToEdgeBottomSheetDialog() {

private val switchUserViewModel: SwitchUserViewModel by activityViewModels()

private val accountsAdapter = SwitchUserAdapter(
currentUserId = AccountUtils.currentUserId,
onChangingUserAccount = { user ->
if (user.id == AccountUtils.currentUserId) {
ConfettiUtils.onEasterEggConfettiClicked(
container = (activity as? MainActivity)?.getConfettiContainer(),
type = COLORED_SNOW,
matomoValue = "Avatar",
)
} else {
switchUserViewModel.switchAccount(user)
}
},
)

private val navigationArgs: AccountBottomSheetDialogArgs by navArgs()
private val accountsAdapter by lazy {
SwitchUserAdapter(
currentUserId = AccountUtils.currentUserId,
onChangingUserAccount = { user ->
if (user.id == AccountUtils.currentUserId) {
ConfettiUtils.onEasterEggConfettiClicked(
container = (activity as? MainActivity)?.getConfettiContainer(),
type = COLORED_SNOW,
matomoValue = "Avatar",
)
} else {
switchUserViewModel.switchAccount(user)
}
},
onOpenContactCard = if (navigationArgs.showContactCard) { { user ->
if (user.id == AccountUtils.currentUserId) openContactCard(user.id)
} } else null,
)
}


override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
return BottomSheetAccountBinding.inflate(inflater, container, false).also { binding = it }.root
Expand Down Expand Up @@ -111,6 +121,11 @@ class AccountBottomSheetDialog : EdgeToEdgeBottomSheetDialog() {
showEasterEggHalloween()
}

override fun onResume() {
super.onResume()
accountsAdapter.animateCurrentUserQrCode(binding.recyclerViewAccount)
}

private fun logoutCurrentUser() = appScope.launch(ioDispatcher) {
trackAccountEvent(MatomoName.LogOutConfirm)
logoutUser(user = AccountUtils.currentUser!!)
Expand All @@ -136,4 +151,9 @@ class AccountBottomSheetDialog : EdgeToEdgeBottomSheetDialog() {
halloween.playAnimation()
}
}

private fun openContactCard(userId: Int) {
safelyNavigate(AccountBottomSheetDialogDirections.actionAccountBottomSheetDialogToContactCardFragment(userId))
dismiss()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
Expand All @@ -36,16 +38,18 @@ import com.infomaniak.mail.ui.theme.MailTheme
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MailTopAppBar(
title: @Composable () -> Unit = {},
navigationIcon: @Composable () -> Unit = {},
actions: @Composable RowScope.() -> Unit = {}
actions: @Composable RowScope.() -> Unit = {},
containerColor: Color = MaterialTheme.colorScheme.background
) {
CenterAlignedTopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.background,
containerColor = containerColor,
navigationIconContentColor = MaterialTheme.colorScheme.primary,
actionIconContentColor = MaterialTheme.colorScheme.primary
),
title = {},
title = title,
navigationIcon = navigationIcon,
actions = actions
)
Expand Down Expand Up @@ -79,6 +83,15 @@ object TopAppBarButtons {
)
}

@Composable
fun MailTopAppBarTitle(text: String) {
Text(
text = text,
style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface
)
}

@PreviewAllWindows
@Composable
private fun BrandTopAppBarPreview() {
Expand Down
Loading
Loading