diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..130cf2e07 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,24 @@ +root = true + +[*.{kt,kts}] +end_of_line = lf +ij_kotlin_packages_to_use_import_on_demand = true +ij_kotlin_allow_trailing_comma = true +ij_kotlin_allow_trailing_comma_on_call_site = true +ij_kotlin_imports_layout = * +ij_kotlin_indent_before_arrow_on_new_line = false +ij_kotlin_line_break_after_multiline_when_entry = true +indent_size = 4 +indent_style = space +insert_final_newline = true +parameter-list-wrapping = true +ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than = 8 +ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 4 +ktlint_code_style = android_studio +ktlint_enum_entry_name_casing = upper_or_camel_cases +ktlint_function_naming_ignore_when_annotated_with = Composable +ktlint_function_signature_body_expression_wrapping = default +ktlint_ignore_back_ticked_identifier = false +max_line_length = 140 + + diff --git a/.gitignore b/.gitignore index 86fdc5392..1f139b6f6 100644 --- a/.gitignore +++ b/.gitignore @@ -38,17 +38,7 @@ captures/ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -/.idea/encodings.xml -.idea/saveactions_settings.xml -.idea/deploymentTargetDropDown.xml -.idea/gradle.xml -.idea/misc.xml + .DS_Store /build /captures @@ -87,8 +77,14 @@ GoogleService-Info.plist GoogleService-Info.plist Pods/ *.xcworkspace -.idea/inspectionProfiles/profiles_settings.xml -.idea/inspectionProfiles/Project_Default.xml -.idea/dictionaries/matyas.xml -/.idea/ .kotlin +.idea/.name +.idea/compiler.xml +.idea/deploymentTargetSelector.xml +.idea/gradle.xml +.idea/kotlinc.xml +.idea/misc.xml +.idea/runConfigurations.xml +.idea/vcs.xml +.idea/workspace.xml +.idea/caches/deviceStreaming.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 000000000..6c0b91968 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000..0f7bc519d --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + diff --git a/.idea/inspectionProfiles/ktlint.xml b/.idea/inspectionProfiles/ktlint.xml new file mode 100644 index 000000000..7d04a74be --- /dev/null +++ b/.idea/inspectionProfiles/ktlint.xml @@ -0,0 +1,7 @@ + + + + diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..64580d143 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index a4d91700a..8881129e3 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,9 +1,13 @@ - - - + - + + + + @@ -36,11 +40,13 @@ - + + android:name="co.touchlab.droidcon.android.service.impl.DefaultFirebaseMessagingService" + android:exported="false"> diff --git a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt index 86e57adfd..a5c4e27b9 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt @@ -44,7 +44,9 @@ import org.brightify.hyperdrive.multiplatformx.LifecycleGraph import org.koin.core.component.KoinComponent import org.koin.core.component.inject -class MainActivity : ComponentActivity(), KoinComponent { +class MainActivity : + ComponentActivity(), + KoinComponent { private val notificationSchedulingService: NotificationSchedulingService by inject() private val syncService: SyncService by inject() @@ -56,7 +58,7 @@ class MainActivity : ComponentActivity(), KoinComponent { private val root = LifecycleGraph.Root(this) private val requestPermissionLauncher = registerForActivityResult( - ActivityResultContracts.RequestPermission() + ActivityResultContracts.RequestPermission(), ) { isGranted: Boolean -> } @@ -103,12 +105,12 @@ class MainActivity : ComponentActivity(), KoinComponent { modifier = Modifier .background(Colors.primary) .fillMaxSize(), - contentAlignment = Alignment.Center + contentAlignment = Alignment.Center, ) { Image( painter = painterResource(id = R.drawable.ic_splash_screen), contentDescription = getString(R.string.droidcon_title), - modifier = Modifier.padding(32.dp) + modifier = Modifier.padding(32.dp), ) } } diff --git a/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt b/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt index c073066d7..538bfef59 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt @@ -50,7 +50,7 @@ class MainApp : Application() { single { AndroidAnalyticsService(firebaseAnalytics = Firebase.analytics) } - } + uiModule + } + uiModule, ) } } diff --git a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt index 2fce49a75..8f19da9f5 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt @@ -10,7 +10,6 @@ import com.google.firebase.messaging.RemoteMessage import kotlinx.coroutines.MainScope import kotlinx.coroutines.launch import org.koin.android.ext.android.inject -import org.koin.core.component.inject class DefaultFirebaseMessagingService : FirebaseMessagingService() { private val notificationService: AndroidNotificationService by inject() @@ -22,10 +21,10 @@ class DefaultFirebaseMessagingService : FirebaseMessagingService() { override fun onMessageReceived(message: RemoteMessage) { super.onMessageReceived(message) - if (message.data.isNotEmpty() && message.data[Notification.Keys.notificationType] == Notification.Values.refreshDataType) { + if (message.data.isNotEmpty() && message.data[Notification.Keys.NOTIFICATION_TYPE] == Notification.Values.REFRESH_DATA_TYPE) { MainScope().launch { notificationService.handleNotification( - Notification.Remote.RefreshData + Notification.Remote.RefreshData, ) } } diff --git a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultParseUrlViewService.kt b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultParseUrlViewService.kt index 14d7e86d2..0824b44f6 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultParseUrlViewService.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultParseUrlViewService.kt @@ -8,7 +8,5 @@ class DefaultParseUrlViewService : ParseUrlViewService { private val urlRegex = Patterns.WEB_URL.toRegex() - override fun parse(text: String): List { - return urlRegex.findAll(text).map { WebLink(it.range, it.value) }.toList() - } + override fun parse(text: String): List = urlRegex.findAll(text).map { WebLink(it.range, it.value) }.toList() } diff --git a/android/src/main/java/co/touchlab/droidcon/android/util/NotificationLocalizedStringFactory.kt b/android/src/main/java/co/touchlab/droidcon/android/util/NotificationLocalizedStringFactory.kt index 96f07e388..41856c259 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/util/NotificationLocalizedStringFactory.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/util/NotificationLocalizedStringFactory.kt @@ -4,24 +4,16 @@ import android.content.Context import co.touchlab.droidcon.R import co.touchlab.droidcon.application.service.NotificationSchedulingService -class NotificationLocalizedStringFactory( - private val context: Context, -) : NotificationSchedulingService.LocalizedStringFactory { +class NotificationLocalizedStringFactory(private val context: Context) : NotificationSchedulingService.LocalizedStringFactory { override fun reminderTitle(roomName: String?): String { val ending = roomName?.let { context.getString(R.string.notification_reminder_title_in_room, it) } ?: "" return context.getString(R.string.notification_reminder_title_base, ending) } - override fun reminderBody(sessionTitle: String): String { - return context.getString(R.string.notification_reminder_body, sessionTitle) - } + override fun reminderBody(sessionTitle: String): String = context.getString(R.string.notification_reminder_body, sessionTitle) - override fun feedbackTitle(): String { - return context.getString(R.string.notification_feedback_title) - } + override fun feedbackTitle(): String = context.getString(R.string.notification_feedback_title) - override fun feedbackBody(): String { - return context.getString(R.string.notification_feedback_body) - } + override fun feedbackBody(): String = context.getString(R.string.notification_feedback_body) } diff --git a/android/src/main/res/drawable-night/about_kotlin.xml b/android/src/main/res/drawable-night/about_kotlin.xml index 40181fdf2..0d03ca44a 100644 --- a/android/src/main/res/drawable-night/about_kotlin.xml +++ b/android/src/main/res/drawable-night/about_kotlin.xml @@ -4,40 +4,45 @@ android:height="528dp" android:viewportWidth="2435" android:viewportHeight="528"> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/android/src/main/res/drawable/about_kotlin.xml b/android/src/main/res/drawable/about_kotlin.xml index dbe8bd541..18bed16fc 100644 --- a/android/src/main/res/drawable/about_kotlin.xml +++ b/android/src/main/res/drawable/about_kotlin.xml @@ -4,40 +4,45 @@ android:height="528dp" android:viewportWidth="2435" android:viewportHeight="528"> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/android/src/main/res/drawable/ic_baseline_insert_invitation_24.xml b/android/src/main/res/drawable/ic_baseline_insert_invitation_24.xml index 98cf2e2a9..9087f64a5 100755 --- a/android/src/main/res/drawable/ic_baseline_insert_invitation_24.xml +++ b/android/src/main/res/drawable/ic_baseline_insert_invitation_24.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + android:pathData="M17,12h-5v5h5v-5zM16,1v2L8,3L8,1L6,1v2L5,3c-1.11,0 -1.99,0.9 -1.99,2L3,19c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2h-1L18,1h-2zM19,19L5,19L5,8h14v11z" /> diff --git a/android/src/main/res/drawable/linkedin.xml b/android/src/main/res/drawable/linkedin.xml index b58dac324..b9ed41646 100644 --- a/android/src/main/res/drawable/linkedin.xml +++ b/android/src/main/res/drawable/linkedin.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="72" + android:viewportHeight="72"> +V31.4h6.8v3.1h0.1c0.9-1.8,3.3-3.7,6.7-3.7c7.2,0,8.5,4.7,8.5,10.9V54.4z" /> diff --git a/android/src/main/res/drawable/twitter.xml b/android/src/main/res/drawable/twitter.xml index edd5d3001..3241156c7 100644 --- a/android/src/main/res/drawable/twitter.xml +++ b/android/src/main/res/drawable/twitter.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportHeight="72" + android:viewportWidth="72"> +c0-0.4,0-0.9,0-1.3C57,24.8,58.7,23.1,60,21.1Z" /> diff --git a/android/src/main/res/values/themes.xml b/android/src/main/res/values/themes.xml index 27cd65174..6ab3e289b 100644 --- a/android/src/main/res/values/themes.xml +++ b/android/src/main/res/values/themes.xml @@ -12,8 +12,7 @@ @style/Theme.Droidcon - +