diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
index 20e311cf..79ee123c 100644
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -1,5 +1,5 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml
index d8406631..c45eabc6 100644
--- a/androidApp/src/main/AndroidManifest.xml
+++ b/androidApp/src/main/AndroidManifest.xml
@@ -3,13 +3,13 @@
xmlns:tools="http://schemas.android.com/tools">
-
+
@@ -46,9 +46,9 @@
+ android:exported="false"
+ android:name=".messaging.AndroidMakersMessagingService">
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/AndroidMakersApplication.kt b/androidApp/src/main/java/fr/paug/androidmakers/AndroidMakersApplication.kt
index ec4ed75c..d6bc3fe3 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/AndroidMakersApplication.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/AndroidMakersApplication.kt
@@ -9,24 +9,27 @@ import io.openfeedback.android.OpenFeedback
class AndroidMakersApplication : Application() {
- lateinit var openFeedback: OpenFeedback
+ private lateinit var openFeedback: OpenFeedback
override fun onCreate() {
super.onCreate()
DependenciesBuilder(this).inject(
- listOf(androidViewModelModule, viewModelModule)
+ listOf(
+ androidViewModelModule,
+ viewModelModule
+ )
)
openFeedback = OpenFeedback(
- context = this,
- openFeedbackProjectId = "am2023",
- firebaseConfig = OpenFeedback.FirebaseConfig(
- projectId = "open-feedback-42",
- applicationId = "1:635903227116:web:31de912f8bf29befb1e1c9",
- apiKey = "AIzaSyB3ELJsaiItrln0uDGSuuHE1CfOJO67Hb4",
- databaseUrl = "https://open-feedback-42.firebaseio.com"
- )
+ context = this,
+ openFeedbackProjectId = "am2023",
+ firebaseConfig = OpenFeedback.FirebaseConfig(
+ projectId = "open-feedback-42",
+ applicationId = "1:635903227116:web:31de912f8bf29befb1e1c9",
+ apiKey = "AIzaSyB3ELJsaiItrln0uDGSuuHE1CfOJO67Hb4",
+ databaseUrl = "https://open-feedback-42.firebaseio.com"
+ )
)
}
}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/messaging/AndroidMakersMessagingService.kt b/androidApp/src/main/java/fr/paug/androidmakers/messaging/AndroidMakersMessagingService.kt
index 0625e41c..02084f09 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/messaging/AndroidMakersMessagingService.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/messaging/AndroidMakersMessagingService.kt
@@ -45,26 +45,30 @@ class AndroidMakersMessagingService : FirebaseMessagingService() {
private fun sendNotification(messageBody: String) {
val intent = Intent(this, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
- val pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
- PendingIntent.FLAG_IMMUTABLE)
+ val pendingIntent = PendingIntent.getActivity(
+ this, 0 /* Request code */, intent,
+ PendingIntent.FLAG_IMMUTABLE
+ )
val channelId = "fcm_default_channel"
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
val notificationBuilder = NotificationCompat.Builder(this, channelId)
- .setContentTitle("FCM Message")
- .setContentText(messageBody)
- .setSmallIcon(R.drawable.notification)
- .setAutoCancel(true)
- .setSound(defaultSoundUri)
- .setContentIntent(pendingIntent)
+ .setContentTitle("FCM Message")
+ .setContentText(messageBody)
+ .setSmallIcon(R.drawable.notification)
+ .setAutoCancel(true)
+ .setSound(defaultSoundUri)
+ .setContentIntent(pendingIntent)
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// Since android Oreo notification channel is needed.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- val channel = NotificationChannel(channelId,
- "Channel human readable title",
- NotificationManager.IMPORTANCE_DEFAULT)
+ val channel = NotificationChannel(
+ channelId,
+ "Channel human readable title",
+ NotificationManager.IMPORTANCE_DEFAULT
+ )
notificationManager.createNotificationChannel(channel)
}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivity.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivity.kt
index 39f88f4b..42e3dab6 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivity.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivity.kt
@@ -17,6 +17,7 @@ import androidx.compose.runtime.staticCompositionLocalOf
import androidx.core.view.WindowCompat
import androidx.lifecycle.lifecycleScope
import com.androidmakers.ui.MainLayout
+import com.androidmakers.ui.theme.AndroidMakersTheme
import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
@@ -30,7 +31,6 @@ import dev.gitlive.firebase.auth.auth
import fr.androidmakers.store.firebase.toUser
import fr.paug.androidmakers.BuildConfig
import fr.paug.androidmakers.R
-import fr.paug.androidmakers.ui.theme.AndroidMakersTheme
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -46,7 +46,6 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
- enableEdgeToEdge()
logFCMToken()
@@ -57,28 +56,28 @@ class MainActivity : AppCompatActivity() {
val darkTheme = isSystemInDarkTheme()
CompositionLocalProvider(
- LocalActivity provides rememberedActivity,
+ LocalActivity provides rememberedActivity,
) {
KoinContext {
AndroidMakersTheme {
DisposableEffect(darkTheme) {
enableEdgeToEdge(
- statusBarStyle = SystemBarStyle.auto(
- Color.TRANSPARENT,
- Color.TRANSPARENT,
- ) { darkTheme },
- navigationBarStyle = SystemBarStyle.auto(
- Color.TRANSPARENT,
- Color.TRANSPARENT,
- ) { darkTheme },
+ statusBarStyle = SystemBarStyle.auto(
+ Color.TRANSPARENT,
+ Color.TRANSPARENT,
+ ) { darkTheme },
+ navigationBarStyle = SystemBarStyle.auto(
+ Color.TRANSPARENT,
+ Color.TRANSPARENT,
+ ) { darkTheme },
)
onDispose { }
}
MainLayout(
- user = userState.value,
- versionName = BuildConfig.VERSION_NAME,
- versionCode = BuildConfig.VERSION_CODE.toString(),
+ user = userState.value,
+ versionName = BuildConfig.VERSION_NAME,
+ versionCode = BuildConfig.VERSION_CODE.toString(),
)
}
}
@@ -103,7 +102,7 @@ class MainActivity : AppCompatActivity() {
when (requestCode) {
REQ_SIGNIN -> {
val task: Task =
- GoogleSignIn.getSignedInAccountFromIntent(data)
+ GoogleSignIn.getSignedInAccountFromIntent(data)
try {
val account: GoogleSignInAccount = task.getResult(ApiException::class.java)
val idToken = account.idToken
@@ -138,8 +137,8 @@ class MainActivity : AppCompatActivity() {
fun signout() {
val activity = this
val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
- .requestIdToken(activity.getString(R.string.default_web_client_id))
- .build()
+ .requestIdToken(activity.getString(R.string.default_web_client_id))
+ .build()
val googleSignInClient = GoogleSignIn.getClient(activity, gso)
lifecycleScope.launch {
@@ -153,8 +152,8 @@ class MainActivity : AppCompatActivity() {
fun signin() {
val activity = this
val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
- .requestIdToken(activity.getString(R.string.default_web_client_id))
- .build()
+ .requestIdToken(activity.getString(R.string.default_web_client_id))
+ .build()
val googleSignInClient = GoogleSignIn.getClient(activity, gso)
activity.startActivityForResult(googleSignInClient.signInIntent, REQ_SIGNIN)
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivityViewModel.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivityViewModel.kt
index 4e5014ce..e5cb2ef3 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivityViewModel.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/ui/MainActivityViewModel.kt
@@ -13,7 +13,7 @@ class MainActivityViewModel(
private val userRepository: UserRepository,
val syncBookmarksUseCase: SyncBookmarksUseCase
-): ViewModel() {
+) : ViewModel() {
private val _user = MutableStateFlow(null)
val user: Flow = _user
@@ -23,9 +23,9 @@ class MainActivityViewModel(
val currentUser = _user.value
if (currentUser != null) {
- // fire & forget
- // This is racy but oh well...
- syncBookmarksUseCase(currentUser.id)
+ // fire & forget
+ // This is racy but oh well...
+ syncBookmarksUseCase(currentUser.id)
}
}
}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/components/ShowRationalPermissionDialog.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/components/ShowRationalPermissionDialog.kt
index 8f002be7..c64d0919 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/components/ShowRationalPermissionDialog.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/ui/components/ShowRationalPermissionDialog.kt
@@ -3,51 +3,41 @@ package fr.paug.androidmakers.ui.components
import android.content.Intent
import android.net.Uri
import android.provider.Settings
-import androidx.compose.foundation.layout.Column
-import androidx.compose.foundation.layout.Spacer
-import androidx.compose.foundation.layout.height
-import androidx.compose.foundation.layout.padding
-import androidx.compose.foundation.layout.wrapContentHeight
-import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ExperimentalMaterial3Api
-import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
-import androidx.compose.ui.unit.dp
import fr.paug.androidmakers.R
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ShowRationalPermissionDialog(
- packageName: String,
- openDialog: MutableState,
- onclick: () -> Unit,
+ packageName: String,
+ openDialog: MutableState,
+ onclick: () -> Unit,
) {
if (openDialog.value) {
val context = LocalContext.current
AlertDialog(
- onDismissRequest = { openDialog.value = false },
- title = { Text(text = stringResource(id = R.string.permission_notifications_rationale_title)) },
- text = { Text(text = stringResource(id = R.string.permission_notifications_rationale_text)) },
- confirmButton = {
- TextButton(
- onClick = {
- openDialog.value = false
- val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
- intent.data = Uri.parse("package:$packageName")
- context.startActivity(intent)
- }
- ) {
- Text(stringResource(id = R.string.permission_notifications_rationale_positive))
+ onDismissRequest = { openDialog.value = false },
+ title = { Text(text = stringResource(id = R.string.permission_notifications_rationale_title)) },
+ text = { Text(text = stringResource(id = R.string.permission_notifications_rationale_text)) },
+ confirmButton = {
+ TextButton(
+ onClick = {
+ openDialog.value = false
+ val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
+ intent.data = Uri.parse("package:$packageName")
+ context.startActivity(intent)
}
+ ) {
+ Text(stringResource(id = R.string.permission_notifications_rationale_positive))
}
+ }
)
}
}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/components/SigninButton.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/components/SigninButton.kt
index 793aa325..2afd2898 100644
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/components/SigninButton.kt
+++ b/androidApp/src/main/java/fr/paug/androidmakers/ui/components/SigninButton.kt
@@ -28,49 +28,49 @@ fun SigninButton(user: User?) {
val expandedState = remember { mutableStateOf(false) }
IconButton(
- onClick = {
- expandedState.value = true
- }
+ onClick = {
+ expandedState.value = true
+ }
) {
if (user == null) {
Icon(
- imageVector = Icons.Rounded.AccountCircle,
- contentDescription = stringResource(MR.strings.signin)
+ imageVector = Icons.Rounded.AccountCircle,
+ contentDescription = stringResource(MR.strings.signin)
)
} else {
AsyncImage(
- model = ImageRequest.Builder(LocalContext.current)
- .data(user.photoUrl)
- .build(),
- modifier = Modifier.clip(CircleShape),
- contentDescription = stringResource(MR.strings.signout)
+ model = ImageRequest.Builder(LocalContext.current)
+ .data(user.photoUrl)
+ .build(),
+ modifier = Modifier.clip(CircleShape),
+ contentDescription = stringResource(MR.strings.signout)
)
}
}
DropdownMenu(
- expanded = expandedState.value,
- onDismissRequest = { expandedState.value = false }
+ expanded = expandedState.value,
+ onDismissRequest = { expandedState.value = false }
) {
if (user == null) {
DropdownMenuItem(
- text = {
- Text(stringResource(MR.strings.signin))
- },
- onClick = {
- expandedState.value = false
- activity.signin()
- }
+ text = {
+ Text(stringResource(MR.strings.signin))
+ },
+ onClick = {
+ expandedState.value = false
+ activity.signin()
+ }
)
} else {
DropdownMenuItem(
- text = {
- Text(stringResource(MR.strings.signout))
- },
- onClick = {
- expandedState.value = false
- activity.signout()
- }
+ text = {
+ Text(stringResource(MR.strings.signout))
+ },
+ onClick = {
+ expandedState.value = false
+ activity.signout()
+ }
)
}
}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/AndroidMakersTheme.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/AndroidMakersTheme.kt
deleted file mode 100644
index 0ec1569f..00000000
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/AndroidMakersTheme.kt
+++ /dev/null
@@ -1,131 +0,0 @@
-package fr.paug.androidmakers.ui.theme
-
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.Typography
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.Font
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-import fr.paug.androidmakers.R
-import moe.tlaster.precompose.PreComposeApp
-
-val GillSans = FontFamily(
- Font(R.font.gill_sans_light, FontWeight.Light),
-)
-
-val Inter = FontFamily(
- Font(R.font.inter_bold, FontWeight.Bold),
- Font(R.font.inter_light, FontWeight.Light),
- Font(R.font.inter_semibold, FontWeight.SemiBold),
- Font(R.font.inter_medium, FontWeight.Medium),
- Font(R.font.inter_regular, FontWeight.Normal)
-)
-
-val AndroidMakersTypography = Typography(
- displayLarge = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Bold,
- fontSize = 57.sp,
- letterSpacing = (0.5).sp,
- ),
- displayMedium = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Bold,
- fontSize = 45.sp,
- letterSpacing = (0.5).sp,
- ),
- displaySmall = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Normal,
- fontSize = 36.sp,
- letterSpacing = (0.5).sp,
- ),
- headlineLarge = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Bold,
- fontSize = 32.sp,
- letterSpacing = (0.5).sp,
- ),
- headlineMedium = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Bold,
- fontSize = 28.sp,
- letterSpacing = (0.5).sp,
- ),
- headlineSmall = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Bold,
- fontSize = 24.sp,
- letterSpacing = (0.5).sp,
- ),
- titleLarge = TextStyle(
- fontFamily = GillSans,
- fontSize = 22.sp,
- fontWeight = FontWeight.Light,
- letterSpacing = (0.5).sp,
- ),
- titleMedium = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Light,
- fontSize = 16.sp,
- letterSpacing = (0.5).sp,
- ),
- titleSmall = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.Light,
- fontSize = 14.sp,
- letterSpacing = (0.5).sp,
- ),
- labelLarge = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.SemiBold,
- fontSize = 14.sp,
- letterSpacing = (0.5).sp,
- ),
- labelMedium = TextStyle(
- fontFamily = GillSans,
- fontWeight = FontWeight.SemiBold,
- fontSize = 12.sp,
- letterSpacing = (0.5).sp,
- ),
- bodyLarge = TextStyle(
- fontFamily = Inter,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp,
- letterSpacing = (0.5).sp,
- ),
- bodyMedium = TextStyle(
- fontFamily = Inter,
- fontWeight = FontWeight.Normal,
- fontSize = 14.sp,
- letterSpacing = (0.5).sp,
- ),
- bodySmall = TextStyle(
- fontFamily = Inter,
- fontWeight = FontWeight.Normal,
- fontSize = 12.sp,
- letterSpacing = (0.5).sp,
- )
-)
-
-
-@Composable
-fun AndroidMakersTheme(
- useDarkTheme: Boolean = isSystemInDarkTheme(),
- content: @Composable () -> Unit
-) {
-
- val colorSchemeColors = if (!useDarkTheme) LightDefaultColorScheme else DarkDefaultColorScheme
-
- PreComposeApp {
- MaterialTheme(
- colorScheme = colorSchemeColors,
- typography = AndroidMakersTypography,
- content = content,
- )
- }
-}
diff --git a/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/Color.kt b/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/Color.kt
deleted file mode 100644
index ce5fca0d..00000000
--- a/androidApp/src/main/java/fr/paug/androidmakers/ui/theme/Color.kt
+++ /dev/null
@@ -1,136 +0,0 @@
-package fr.paug.androidmakers.ui.theme
-
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.ui.graphics.Color
-
-val md_theme_light_primary = Color(0xFF3140FB)
-val md_theme_light_onPrimary = Color(0xFFFFFFFF)
-val md_theme_light_primaryContainer = Color(0xFFE0E0FF)
-val md_theme_light_onPrimaryContainer = Color(0xFF000569)
-val md_theme_light_secondary = Color(0xFF1E6D1E)
-val md_theme_light_onSecondary = Color(0xFFFFFFFF)
-val md_theme_light_secondaryContainer = Color(0xFFA4F696)
-val md_theme_light_onSecondaryContainer = Color(0xFF002202)
-val md_theme_light_tertiary = Color(0xFFBE0622)
-val md_theme_light_onTertiary = Color(0xFFFFFFFF)
-val md_theme_light_tertiaryContainer = Color(0xFFFFDAD7)
-val md_theme_light_onTertiaryContainer = Color(0xFF410005)
-val md_theme_light_error = Color(0xFFBA1A1A)
-val md_theme_light_errorContainer = Color(0xFFFFDAD6)
-val md_theme_light_onError = Color(0xFFFFFFFF)
-val md_theme_light_onErrorContainer = Color(0xFF410002)
-val md_theme_light_background = Color(0xFFFFFFFF)
-val md_theme_light_onBackground = Color(0xFF1B1B1F)
-val md_theme_light_surface = Color(0xFFF5F5F5)
-val md_theme_light_onSurface = Color(0xFF1B1B1F)
-val md_theme_light_surfaceVariant = Color(0xFFE3E1EC)
-val md_theme_light_onSurfaceVariant = Color(0xFF46464F)
-val md_theme_light_outline = Color(0xFF777680)
-val md_theme_light_inverseOnSurface = Color(0xFFF3F0F4)
-val md_theme_light_inverseSurface = Color(0xFF303034)
-val md_theme_light_inversePrimary = Color(0xFFBEC2FF)
-val md_theme_light_shadow = Color(0xFF000000)
-val md_theme_light_surfaceTint = Color(0xFF3140FB)
-val md_theme_light_outlineVariant = Color(0xFFC7C5D0)
-val md_theme_light_scrim = Color(0xFF000000)
-
-val md_theme_dark_primary = Color(0xFFBEC2FF)
-val md_theme_dark_onPrimary = Color(0xFF000BA6)
-val md_theme_dark_primaryContainer = Color(0xFF0014E6)
-val md_theme_dark_onPrimaryContainer = Color(0xFFE0E0FF)
-val md_theme_dark_secondary = Color(0xFF89DA7D)
-val md_theme_dark_onSecondary = Color(0xFF003A04)
-val md_theme_dark_secondaryContainer = Color(0xFF005309)
-val md_theme_dark_onSecondaryContainer = Color(0xFFA4F696)
-val md_theme_dark_tertiary = Color(0xFFFFB3AF)
-val md_theme_dark_onTertiary = Color(0xFF68000D)
-val md_theme_dark_tertiaryContainer = Color(0xFF930017)
-val md_theme_dark_onTertiaryContainer = Color(0xFFFFDAD7)
-val md_theme_dark_error = Color(0xFFFFB4AB)
-val md_theme_dark_errorContainer = Color(0xFF93000A)
-val md_theme_dark_onError = Color(0xFF690005)
-val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6)
-val md_theme_dark_background = Color(0xFF1B1B1F)
-val md_theme_dark_onBackground = Color(0xFFE5E1E6)
-val md_theme_dark_surface = Color(0xFF2F2F2F)
-val md_theme_dark_onSurface = Color(0xFFE5E1E6)
-val md_theme_dark_surfaceVariant = Color(0xFF46464F)
-val md_theme_dark_onSurfaceVariant = Color(0xFFC7C5D0)
-val md_theme_dark_outline = Color(0xFF91909A)
-val md_theme_dark_inverseOnSurface = Color(0xFF1B1B1F)
-val md_theme_dark_inverseSurface = Color(0xFFE5E1E6)
-val md_theme_dark_inversePrimary = Color(0xFF3140FB)
-val md_theme_dark_shadow = Color(0xFF000000)
-val md_theme_dark_surfaceTint = Color(0xFFBEC2FF)
-val md_theme_dark_outlineVariant = Color(0xFF46464F)
-val md_theme_dark_scrim = Color(0xFF000000)
-
-
-val seed = Color(0xFF0014E6)
-
-
-val LightDefaultColorScheme = lightColorScheme(
- primary = md_theme_light_primary,
- onPrimary = md_theme_light_onPrimary,
- primaryContainer = md_theme_light_primaryContainer,
- onPrimaryContainer = md_theme_light_onPrimaryContainer,
- secondary = md_theme_light_secondary,
- onSecondary = md_theme_light_onSecondary,
- secondaryContainer = md_theme_light_secondaryContainer,
- onSecondaryContainer = md_theme_light_onSecondaryContainer,
- tertiary = md_theme_light_tertiary,
- onTertiary = md_theme_light_onTertiary,
- tertiaryContainer = md_theme_light_tertiaryContainer,
- onTertiaryContainer = md_theme_light_onTertiaryContainer,
- error = md_theme_light_error,
- errorContainer = md_theme_light_errorContainer,
- onError = md_theme_light_onError,
- onErrorContainer = md_theme_light_onErrorContainer,
- background = md_theme_light_background,
- onBackground = md_theme_light_onBackground,
- surface = md_theme_light_surface,
- onSurface = md_theme_light_onSurface,
- surfaceVariant = md_theme_light_surfaceVariant,
- onSurfaceVariant = md_theme_light_onSurfaceVariant,
- outline = md_theme_light_outline,
- inverseOnSurface = md_theme_light_inverseOnSurface,
- inverseSurface = md_theme_light_inverseSurface,
- inversePrimary = md_theme_light_inversePrimary,
- surfaceTint = md_theme_light_surfaceTint,
- outlineVariant = md_theme_light_outlineVariant,
- scrim = md_theme_light_scrim,
-)
-
-
-val DarkDefaultColorScheme = darkColorScheme(
- primary = md_theme_dark_primary,
- onPrimary = md_theme_dark_onPrimary,
- primaryContainer = md_theme_dark_primaryContainer,
- onPrimaryContainer = md_theme_dark_onPrimaryContainer,
- secondary = md_theme_dark_secondary,
- onSecondary = md_theme_dark_onSecondary,
- secondaryContainer = md_theme_dark_secondaryContainer,
- onSecondaryContainer = md_theme_dark_onSecondaryContainer,
- tertiary = md_theme_dark_tertiary,
- onTertiary = md_theme_dark_onTertiary,
- tertiaryContainer = md_theme_dark_tertiaryContainer,
- onTertiaryContainer = md_theme_dark_onTertiaryContainer,
- error = md_theme_dark_error,
- errorContainer = md_theme_dark_errorContainer,
- onError = md_theme_dark_onError,
- onErrorContainer = md_theme_dark_onErrorContainer,
- background = md_theme_dark_background,
- onBackground = md_theme_dark_onBackground,
- surface = md_theme_dark_surface,
- onSurface = md_theme_dark_onSurface,
- surfaceVariant = md_theme_dark_surfaceVariant,
- onSurfaceVariant = md_theme_dark_onSurfaceVariant,
- outline = md_theme_dark_outline,
- inverseOnSurface = md_theme_dark_inverseOnSurface,
- inverseSurface = md_theme_dark_inverseSurface,
- inversePrimary = md_theme_dark_inversePrimary,
- surfaceTint = md_theme_dark_surfaceTint,
- outlineVariant = md_theme_dark_outlineVariant,
- scrim = md_theme_dark_scrim,
-)
diff --git a/androidApp/src/main/res/drawable/ic_launcher_monochrome.xml b/androidApp/src/main/res/drawable/ic_launcher_monochrome.xml
index 46402135..40f9ed09 100644
--- a/androidApp/src/main/res/drawable/ic_launcher_monochrome.xml
+++ b/androidApp/src/main/res/drawable/ic_launcher_monochrome.xml
@@ -1,15 +1,15 @@
-
-
+ android:width="686dp">
+
+
diff --git a/androidApp/src/main/res/values/attrs.xml b/androidApp/src/main/res/values/attrs.xml
index 2f6fcb98..fed9e5e7 100644
--- a/androidApp/src/main/res/values/attrs.xml
+++ b/androidApp/src/main/res/values/attrs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/androidApp/src/test/java/fr/paug/androidmakers/fixtures/FakeAndroidMakersStore.kt b/androidApp/src/test/java/fr/paug/androidmakers/fixtures/FakeAndroidMakersStore.kt
index d21d0dfa..2820ce11 100644
--- a/androidApp/src/test/java/fr/paug/androidmakers/fixtures/FakeAndroidMakersStore.kt
+++ b/androidApp/src/test/java/fr/paug/androidmakers/fixtures/FakeAndroidMakersStore.kt
@@ -1,6 +1,5 @@
package fr.paug.androidmakers.fixtures
-import fr.androidmakers.domain.model.Partner
import fr.androidmakers.domain.model.PartnerGroup
import fr.androidmakers.domain.model.Room
import fr.androidmakers.domain.model.Session
@@ -14,7 +13,8 @@ import fr.androidmakers.domain.repo.VenueRepository
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
-class FakeAndroidMakersStore : RoomsRepository, VenueRepository, SpeakersRepository, SessionsRepository, PartnersRepository {
+class FakeAndroidMakersStore : RoomsRepository, VenueRepository, SpeakersRepository,
+ SessionsRepository, PartnersRepository {
val roomsMutableFlow = MutableStateFlow(Result.success(emptyList()))
override fun getRooms(): Flow>> = roomsMutableFlow
diff --git a/androidApp/src/test/java/fr/paug/androidmakers/ui/components/AgendaLayoutViewModelTest.kt b/androidApp/src/test/java/fr/paug/androidmakers/ui/components/AgendaLayoutViewModelTest.kt
index 05c3e9ce..2c759fc4 100644
--- a/androidApp/src/test/java/fr/paug/androidmakers/ui/components/AgendaLayoutViewModelTest.kt
+++ b/androidApp/src/test/java/fr/paug/androidmakers/ui/components/AgendaLayoutViewModelTest.kt
@@ -18,43 +18,43 @@ class AgendaLayoutViewModelTest {
private val fakeStore = FakeAndroidMakersStore()
private val testSubject = AgendaLayoutViewModel(
- roomsRepository = fakeStore,
- scope = { CoroutineScope(Dispatchers.Unconfined) }
+ roomsRepository = fakeStore,
+ scope = { CoroutineScope(Dispatchers.Unconfined) }
)
@Test
fun `initial state should be correct`() = runBlocking {
assertEquals(
- AgendaLayoutState(
- rooms = emptyList(),
- sessionFilters = emptyList()
- ),
- testSubject.state.first()
+ AgendaLayoutState(
+ rooms = emptyList(),
+ sessionFilters = emptyList()
+ ),
+ testSubject.state.first()
)
}
@Test
fun `given non empty session filters state should be correct`() = runBlocking {
testSubject.onFiltersChanged(
- listOf(
- SessionFilter(
- SessionFilter.FilterType.BOOKMARK,
- "bookmark"
- )
+ listOf(
+ SessionFilter(
+ SessionFilter.FilterType.BOOKMARK,
+ "bookmark"
)
+ )
)
assertEquals(
- AgendaLayoutState(
- rooms = emptyList(),
- sessionFilters = listOf(
- SessionFilter(
- SessionFilter.FilterType.BOOKMARK,
- "bookmark"
- )
- )
- ),
- testSubject.state.first()
+ AgendaLayoutState(
+ rooms = emptyList(),
+ sessionFilters = listOf(
+ SessionFilter(
+ SessionFilter.FilterType.BOOKMARK,
+ "bookmark"
+ )
+ )
+ ),
+ testSubject.state.first()
)
}
@@ -63,11 +63,11 @@ class AgendaLayoutViewModelTest {
fakeStore.roomsMutableFlow.value = Result.failure(RuntimeException("exception"))
assertEquals(
- AgendaLayoutState(
- rooms = emptyList(),
- sessionFilters = emptyList()
- ),
- testSubject.state.first()
+ AgendaLayoutState(
+ rooms = emptyList(),
+ sessionFilters = emptyList()
+ ),
+ testSubject.state.first()
)
}
@@ -76,11 +76,11 @@ class AgendaLayoutViewModelTest {
fakeStore.roomsMutableFlow.value = Result.success(listOf(Room(id = "id", name = "name")))
assertEquals(
- AgendaLayoutState(
- rooms = listOf(Room(id = "id", name = "name")),
- sessionFilters = emptyList()
- ),
- testSubject.state.first()
+ AgendaLayoutState(
+ rooms = listOf(Room(id = "id", name = "name")),
+ sessionFilters = emptyList()
+ ),
+ testSubject.state.first()
)
}
}
diff --git a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/theme/Colors.kt b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/theme/Colors.kt
index ab9a1098..4123aa20 100644
--- a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/theme/Colors.kt
+++ b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/theme/Colors.kt
@@ -4,70 +4,70 @@ import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.ui.graphics.Color
-val md_theme_light_primary = Color(0xFF3140FB)
+val md_theme_light_primary = Color(0xFF006783)
val md_theme_light_onPrimary = Color(0xFFFFFFFF)
-val md_theme_light_primaryContainer = Color(0xFFE0E0FF)
-val md_theme_light_onPrimaryContainer = Color(0xFF000569)
-val md_theme_light_secondary = Color(0xFF1E6D1E)
+val md_theme_light_primaryContainer = Color(0xFFBCE9FF)
+val md_theme_light_onPrimaryContainer = Color(0xFF001F29)
+val md_theme_light_secondary = Color(0xFFAE3024)
val md_theme_light_onSecondary = Color(0xFFFFFFFF)
-val md_theme_light_secondaryContainer = Color(0xFFA4F696)
-val md_theme_light_onSecondaryContainer = Color(0xFF002202)
-val md_theme_light_tertiary = Color(0xFFBE0622)
+val md_theme_light_secondaryContainer = Color(0xFFFFDAD5)
+val md_theme_light_onSecondaryContainer = Color(0xFF410001)
+val md_theme_light_tertiary = Color(0xFFAE3024)
val md_theme_light_onTertiary = Color(0xFFFFFFFF)
-val md_theme_light_tertiaryContainer = Color(0xFFFFDAD7)
-val md_theme_light_onTertiaryContainer = Color(0xFF410005)
+val md_theme_light_tertiaryContainer = Color(0xFFFFDAD5)
+val md_theme_light_onTertiaryContainer = Color(0xFF410001)
val md_theme_light_error = Color(0xFFBA1A1A)
val md_theme_light_errorContainer = Color(0xFFFFDAD6)
val md_theme_light_onError = Color(0xFFFFFFFF)
val md_theme_light_onErrorContainer = Color(0xFF410002)
-val md_theme_light_background = Color(0xFFFFFFFF)
-val md_theme_light_onBackground = Color(0xFF1B1B1F)
-val md_theme_light_surface = Color(0xFFF5F5F5)
-val md_theme_light_onSurface = Color(0xFF1B1B1F)
-val md_theme_light_surfaceVariant = Color(0xFFE3E1EC)
-val md_theme_light_onSurfaceVariant = Color(0xFF46464F)
-val md_theme_light_outline = Color(0xFF777680)
-val md_theme_light_inverseOnSurface = Color(0xFFF3F0F4)
-val md_theme_light_inverseSurface = Color(0xFF303034)
-val md_theme_light_inversePrimary = Color(0xFFBEC2FF)
+val md_theme_light_background = Color(0xFFFBFCFE)
+val md_theme_light_onBackground = Color(0xFF191C1E)
+val md_theme_light_surface = Color(0xFFFBFCFE)
+val md_theme_light_onSurface = Color(0xFF191C1E)
+val md_theme_light_surfaceVariant = Color(0xFFDCE4E9)
+val md_theme_light_onSurfaceVariant = Color(0xFF40484C)
+val md_theme_light_outline = Color(0xFF70787D)
+val md_theme_light_inverseOnSurface = Color(0xFFEFF1F3)
+val md_theme_light_inverseSurface = Color(0xFF2E3132)
+val md_theme_light_inversePrimary = Color(0xFF61D4FF)
val md_theme_light_shadow = Color(0xFF000000)
-val md_theme_light_surfaceTint = Color(0xFF3140FB)
-val md_theme_light_outlineVariant = Color(0xFFC7C5D0)
+val md_theme_light_surfaceTint = Color(0xFF006783)
+val md_theme_light_outlineVariant = Color(0xFFC0C8CC)
val md_theme_light_scrim = Color(0xFF000000)
-val md_theme_dark_primary = Color(0xFFBEC2FF)
-val md_theme_dark_onPrimary = Color(0xFF000BA6)
-val md_theme_dark_primaryContainer = Color(0xFF0014E6)
-val md_theme_dark_onPrimaryContainer = Color(0xFFE0E0FF)
-val md_theme_dark_secondary = Color(0xFF89DA7D)
-val md_theme_dark_onSecondary = Color(0xFF003A04)
-val md_theme_dark_secondaryContainer = Color(0xFF005309)
-val md_theme_dark_onSecondaryContainer = Color(0xFFA4F696)
-val md_theme_dark_tertiary = Color(0xFFFFB3AF)
-val md_theme_dark_onTertiary = Color(0xFF68000D)
-val md_theme_dark_tertiaryContainer = Color(0xFF930017)
-val md_theme_dark_onTertiaryContainer = Color(0xFFFFDAD7)
+val md_theme_dark_primary = Color(0xFF61D4FF)
+val md_theme_dark_onPrimary = Color(0xFF003545)
+val md_theme_dark_primaryContainer = Color(0xFF004D63)
+val md_theme_dark_onPrimaryContainer = Color(0xFFBCE9FF)
+val md_theme_dark_secondary = Color(0xFFFFB4A9)
+val md_theme_dark_onSecondary = Color(0xFF690001)
+val md_theme_dark_secondaryContainer = Color(0xFF8D160F)
+val md_theme_dark_onSecondaryContainer = Color(0xFFFFDAD5)
+val md_theme_dark_tertiary = Color(0xFFFFB4A9)
+val md_theme_dark_onTertiary = Color(0xFF690001)
+val md_theme_dark_tertiaryContainer = Color(0xFF8D160F)
+val md_theme_dark_onTertiaryContainer = Color(0xFFFFDAD5)
val md_theme_dark_error = Color(0xFFFFB4AB)
val md_theme_dark_errorContainer = Color(0xFF93000A)
val md_theme_dark_onError = Color(0xFF690005)
val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6)
-val md_theme_dark_background = Color(0xFF1B1B1F)
-val md_theme_dark_onBackground = Color(0xFFE5E1E6)
-val md_theme_dark_surface = Color(0xFF2F2F2F)
-val md_theme_dark_onSurface = Color(0xFFE5E1E6)
-val md_theme_dark_surfaceVariant = Color(0xFF46464F)
-val md_theme_dark_onSurfaceVariant = Color(0xFFC7C5D0)
-val md_theme_dark_outline = Color(0xFF91909A)
-val md_theme_dark_inverseOnSurface = Color(0xFF1B1B1F)
-val md_theme_dark_inverseSurface = Color(0xFFE5E1E6)
-val md_theme_dark_inversePrimary = Color(0xFF3140FB)
+val md_theme_dark_background = Color(0xFF191C1E)
+val md_theme_dark_onBackground = Color(0xFFE1E2E4)
+val md_theme_dark_surface = Color(0xFF191C1E)
+val md_theme_dark_onSurface = Color(0xFFE1E2E4)
+val md_theme_dark_surfaceVariant = Color(0xFF40484C)
+val md_theme_dark_onSurfaceVariant = Color(0xFFC0C8CC)
+val md_theme_dark_outline = Color(0xFF8A9296)
+val md_theme_dark_inverseOnSurface = Color(0xFF191C1E)
+val md_theme_dark_inverseSurface = Color(0xFFE1E2E4)
+val md_theme_dark_inversePrimary = Color(0xFF006783)
val md_theme_dark_shadow = Color(0xFF000000)
-val md_theme_dark_surfaceTint = Color(0xFFBEC2FF)
-val md_theme_dark_outlineVariant = Color(0xFF46464F)
+val md_theme_dark_surfaceTint = Color(0xFF61D4FF)
+val md_theme_dark_outlineVariant = Color(0xFF40484C)
val md_theme_dark_scrim = Color(0xFF000000)
-val seed = Color(0xFF0014E6)
+val seed = Color(0xFF01B5E4)
val LightDefaultColorScheme = lightColorScheme(