diff --git a/app/build.gradle b/app/build.gradle index ec1fe6b71..1ee97e8e7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.google.gms:google-services:4.4.0' + classpath 'com.google.gms:google-services:4.4.1' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' } } @@ -160,12 +160,12 @@ dependencies { implementation project(":model") implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0" implementation 'com.google.android.material:material:1.11.0' - implementation 'androidx.recyclerview:recyclerview:1.3.0' - implementation 'androidx.browser:browser:1.7.0' + implementation 'androidx.recyclerview:recyclerview:1.3.2' + implementation 'androidx.browser:browser:1.8.0' implementation 'androidx.annotation:annotation:1.7.1' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.exifinterface:exifinterface:1.3.7' @@ -178,7 +178,7 @@ dependencies { // implementation 'com.google.guava:listenablefuture:1.0' implementation 'androidx.paging:paging-runtime:3.2.1' implementation "androidx.constraintlayout:constraintlayout:2.1.4" - implementation 'com.google.android.ump:user-messaging-platform:2.1.0' + implementation 'com.google.android.ump:user-messaging-platform:2.2.0' implementation 'androidx.activity:activity-ktx:1.8.2' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0' @@ -189,23 +189,22 @@ dependencies { implementation 'androidx.fragment:fragment-ktx:1.6.2' implementation "com.google.android.gms:play-services-ads:22.6.0" - implementation 'com.google.firebase:firebase-analytics:21.5.0' - implementation 'com.google.firebase:firebase-crashlytics:18.6.1' + implementation 'com.google.firebase:firebase-analytics:21.5.1' + implementation 'com.google.firebase:firebase-crashlytics:18.6.2' implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation("com.squareup.retrofit2:converter-moshi:2.9.0") - implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0")) + implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0")) implementation "com.squareup.okhttp3:okhttp" implementation "com.squareup.okhttp3:okhttp-dnsoverhttps" implementation "com.squareup.okhttp3:okhttp-brotli" implementation "com.squareup.picasso:picasso:2.8" - implementation "com.squareup.moshi:moshi:1.15.0" + implementation "com.squareup.moshi:moshi:1.15.1" - // do not update >= 1.2.12. leads to hundreds of out of memory errors in crashlytics. no idea why. - implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.12" + implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.28" implementation "com.github.tony19:named-regexp:1.0.0" implementation "com.pnikosis:materialish-progress:1.7" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f37a0f014..5ef984c44 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -58,6 +58,12 @@ android:name="com.sec.android.support.multiwindow" android:value="true" /> + + + diff --git a/app/src/main/java/com/pr0gramm/app/ui/InboxActivity.kt b/app/src/main/java/com/pr0gramm/app/ui/InboxActivity.kt index 80d28c02f..a571d3503 100644 --- a/app/src/main/java/com/pr0gramm/app/ui/InboxActivity.kt +++ b/app/src/main/java/com/pr0gramm/app/ui/InboxActivity.kt @@ -10,6 +10,7 @@ import com.pr0gramm.app.services.InboxService import com.pr0gramm.app.services.ThemeHelper import com.pr0gramm.app.services.Track import com.pr0gramm.app.services.UserService +import com.pr0gramm.app.services.config.ConfigService import com.pr0gramm.app.ui.base.BaseAppCompatActivity import com.pr0gramm.app.ui.base.bindViews import com.pr0gramm.app.ui.base.launchWhenCreated @@ -27,6 +28,7 @@ import com.pr0gramm.app.util.startActivity class InboxActivity : BaseAppCompatActivity("InboxActivity") { private val userService: UserService by instance() private val inboxService: InboxService by instance() + private val configService: ConfigService by instance() private val views by bindViews(ActivityInboxBinding::inflate) @@ -52,13 +54,20 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") { tabsAdapter = TabsStateAdapter(this) - InboxType.values().forEach { type -> + val config = configService.config() + InboxType.entries.forEach { type -> when (type) { - InboxType.PRIVATE -> tabsAdapter.addTab(getString(R.string.inbox_type_private), id = InboxType.PRIVATE) { + InboxType.PRIVATE -> tabsAdapter.addTab( + getString(R.string.inbox_type_private), + id = InboxType.PRIVATE + ) { ConversationsFragment() } - InboxType.COMMENTS_OUT -> tabsAdapter.addTab(getString(R.string.inbox_type_comments_out), id = InboxType.COMMENTS_OUT) { + InboxType.COMMENTS_OUT -> tabsAdapter.addTab( + getString(R.string.inbox_type_comments_out), + id = InboxType.COMMENTS_OUT + ) { WrittenCommentsFragment() } @@ -66,7 +75,10 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") { GenericInboxFragment() } - InboxType.COMMENTS_IN -> tabsAdapter.addTab(getString(R.string.inbox_type_comments_in), id = InboxType.COMMENTS_IN) { + InboxType.COMMENTS_IN -> tabsAdapter.addTab( + getString(R.string.inbox_type_comments_in), + id = InboxType.COMMENTS_IN + ) { GenericInboxFragment(GenericInboxFragment.MessageTypeComments) } @@ -81,11 +93,15 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") { GenericInboxFragment(GenericInboxFragment.MessageTypeNotifications) } - InboxType.DIGESTS -> tabsAdapter.addTab( - getString(R.string.inbox_type_digests), - id = InboxType.DIGESTS - ) { - DigestsFragment() + InboxType.DIGESTS -> { + if (config.showDigestInInbox) { + tabsAdapter.addTab( + getString(R.string.inbox_type_digests), + id = InboxType.DIGESTS + ) { + DigestsFragment() + } + } } } } @@ -125,9 +141,15 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") { tabsAdapter.updateTabTitle(InboxType.ALL, titleOf(R.string.inbox_type_all, counts.total)) tabsAdapter.updateTabTitle(InboxType.PRIVATE, titleOf(R.string.inbox_type_private, counts.messages)) - tabsAdapter.updateTabTitle(InboxType.NOTIFICATIONS, titleOf(R.string.inbox_type_notifications, counts.notifications)) + tabsAdapter.updateTabTitle( + InboxType.NOTIFICATIONS, + titleOf(R.string.inbox_type_notifications, counts.notifications) + ) tabsAdapter.updateTabTitle(InboxType.STALK, titleOf(R.string.inbox_type_stalk, counts.follows)) - tabsAdapter.updateTabTitle(InboxType.COMMENTS_IN, titleOf(R.string.inbox_type_comments_in, counts.comments)) + tabsAdapter.updateTabTitle( + InboxType.COMMENTS_IN, + titleOf(R.string.inbox_type_comments_in, counts.comments) + ) } } } @@ -155,7 +177,7 @@ class InboxActivity : BaseAppCompatActivity("InboxActivity") { private fun handleNewIntent(intent: Intent?) { val extras = intent?.extras ?: return - showInboxType(InboxType.values()[extras.getInt(EXTRA_INBOX_TYPE, 0)]) + showInboxType(InboxType.entries[extras.getInt(EXTRA_INBOX_TYPE, 0)]) } private fun showInboxType(type: InboxType?) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9c94395ae..65352a394 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -540,7 +540,7 @@ Please select a download directory from internal storage or sdcard. All Stalk - Digests + Highlights Notifications Open conversation Comment diff --git a/build.gradle b/build.gradle index 91a9eb35a..405675ce6 100644 --- a/build.gradle +++ b/build.gradle @@ -6,14 +6,14 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.2.2' + classpath 'com.android.tools.build:gradle:8.3.0' } } plugins { id "org.jetbrains.kotlin.android" version "1.9.22" apply false id "org.jetbrains.kotlin.kapt" version "1.9.22" apply false - id "com.github.ben-manes.versions" version "0.42.0" + id "com.github.ben-manes.versions" version "0.51.0" } dependencyUpdates.resolutionStrategy { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 15de90249..e411586a5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/model/build.gradle b/model/build.gradle index 279a91640..08b7c6922 100644 --- a/model/build.gradle +++ b/model/build.gradle @@ -8,8 +8,8 @@ buildscript { plugins { id("com.android.library") id("kotlin-android") - id("app.cash.sqldelight") version "2.0.0" - id("com.google.devtools.ksp") version "1.9.22-1.0.17" + id("app.cash.sqldelight") version "2.0.1" + id("com.google.devtools.ksp") version "1.9.22-1.0.18" } android { @@ -53,10 +53,10 @@ repositories { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0" - implementation "com.squareup.moshi:moshi:1.15.0" + implementation "com.squareup.moshi:moshi:1.15.1" implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.okhttp3:okhttp:4.12.0" @@ -64,5 +64,5 @@ dependencies { api "app.cash.sqldelight:android-driver:2.0.1" api "app.cash.sqldelight:coroutines-extensions-jvm:2.0.1" - ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.0" + ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.1" } diff --git a/model/src/main/java/com/pr0gramm/app/model/config/ConfigModel.kt b/model/src/main/java/com/pr0gramm/app/model/config/ConfigModel.kt index 4382c13c8..46ca94067 100644 --- a/model/src/main/java/com/pr0gramm/app/model/config/ConfigModel.kt +++ b/model/src/main/java/com/pr0gramm/app/model/config/ConfigModel.kt @@ -23,6 +23,8 @@ data class Config( val userClasses: List = DefaultUserClasses, val endOfLifeAndroidVersion: Int = Build.VERSION_CODES.LOLLIPOP, + val showDigestInInbox: Boolean = false, + // currently not working as they closed their affiliate program. val reAffiliate: String = "X-IGNORE",