diff --git a/.github/workflows/run_diffuse.yml b/.github/workflows/run_diffuse.yml index 99ce4e55c..4aa1994ac 100644 --- a/.github/workflows/run_diffuse.yml +++ b/.github/workflows/run_diffuse.yml @@ -52,9 +52,9 @@ jobs: uses: usefulness/diffuse-action@master with: old-file-path: diffuse-source-file-release - old-mapping-path: diffuse-mapping-file-release + # old-mapping-path: diffuse-mapping-file-release new-file-path: app/build/outputs/apk/release/app-release.apk - new-mapping-path: app/build/outputs/mapping/release/mapping.txt + # new-mapping-path: app/build/outputs/mapping/release/mapping.txt - uses: peter-evans/find-comment@v1 id: find_comment diff --git a/app/build.gradle b/app/build.gradle index 41b07f101..5021da28b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ import com.android.build.gradle.internal.LoggerWrapper import com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask +import com.slack.keeper.KeeperVariantMarker import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask plugins { @@ -14,13 +15,6 @@ plugins { id("pl.droidsonroids.animation-disabler") } -keeper { - variantFilter { - setIgnore(name != "releaseTest") - } - traceReferences {} -} - projectConfig { javaFilesAllowed true } @@ -94,16 +88,35 @@ android { exclude '*.properties' exclude 'DebugProbesKt.bin' } - lintOptions { - disable("UnknownNullness") - disable("Range") + lint { + disable += "UnknownNullness" + disable += "Range" } } + +androidComponents { + beforeVariants(selector().withBuildType("releaseTest")) { builder -> + builder.registerExtension(KeeperVariantMarker.class, KeeperVariantMarker.INSTANCE) + } +} + +keeper { + traceReferences {} +} + kotlinter { experimentalRules = false } +easylauncher { + buildTypes { + debug { + filters = customRibbon(ribbonColor: "#2F4F4F", position: "bottom") + } + } +} + repositories { google() maven { url 'https://jitpack.io' } @@ -205,11 +218,3 @@ tasks.withType(DeviceProviderInstrumentTestTask).configureEach { LoggerWrapper.Switch.shouldShowInfoLogsAsLifecycle = false } } - -easylauncher { - buildTypes { - debug { - filters = customRibbon(ribbonColor: "#2F4F4F", position: "bottom") - } - } -} diff --git a/app/src/main/kotlin/io/github/wykopmobilny/WykopApp.kt b/app/src/main/kotlin/io/github/wykopmobilny/WykopApp.kt index 5097c30e0..c7d5e2bf2 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/WykopApp.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/WykopApp.kt @@ -257,7 +257,7 @@ open class WykopApp : DaggerApplication(), ApplicationInjector, AppScopes { val coroutineScope: CoroutineScope, ) - // TODO @mk : 25/07/2021 I don't know where I'm going here yet. Will figure something out 👀 + // TODO @mk : 25/07/2021 I don't know where I'm going here yet. Will figure something out 👀 @Suppress("UNCHECKED_CAST") override fun getDependency(clazz: KClass, scopeId: Any?): T = when (clazz) { @@ -412,6 +412,4 @@ open class WykopApp : DaggerApplication(), ApplicationInjector, AppScopes { } } } - - } diff --git a/app/src/main/kotlin/io/github/wykopmobilny/api/entries/EntriesRepository.kt b/app/src/main/kotlin/io/github/wykopmobilny/api/entries/EntriesRepository.kt index a5ccb040e..8af181be6 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/api/entries/EntriesRepository.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/api/entries/EntriesRepository.kt @@ -104,7 +104,6 @@ class EntriesRepository @Inject constructor( .retryWhen(userTokenRefresher) .compose(ErrorHandlerTransformer()) - override fun deleteEntryComment(commentId: Long) = rxSingle { entriesApi.deleteEntryComment(commentId) } .retryWhen(userTokenRefresher) .compose(ErrorHandlerTransformer()) diff --git a/app/src/main/kotlin/io/github/wykopmobilny/api/links/LinksRepository.kt b/app/src/main/kotlin/io/github/wykopmobilny/api/links/LinksRepository.kt index 1af5f281c..dad7bb8ba 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/api/links/LinksRepository.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/api/links/LinksRepository.kt @@ -232,5 +232,5 @@ class LinksRepository @Inject constructor( rxSingle { linksApi.toggleFavorite(linkId) } .retryWhen(userTokenRefresher) .compose(ErrorHandlerTransformer()) - .map { } + .map { } } diff --git a/app/src/main/kotlin/io/github/wykopmobilny/api/user/LoginRepository.kt b/app/src/main/kotlin/io/github/wykopmobilny/api/user/LoginRepository.kt index 735d8f362..60bb6145d 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/api/user/LoginRepository.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/api/user/LoginRepository.kt @@ -16,5 +16,4 @@ class LoginRepository @Inject constructor( val session = apiPreferences.session.first().let(::checkNotNull) loginApi.getUserSessionToken(login = session.login, accountKey = session.token) } - } diff --git a/app/src/main/kotlin/io/github/wykopmobilny/base/ThemableActivity.kt b/app/src/main/kotlin/io/github/wykopmobilny/base/ThemableActivity.kt index d1af9adc5..b55c486d3 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/base/ThemableActivity.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/base/ThemableActivity.kt @@ -21,7 +21,6 @@ import kotlinx.coroutines.runBlocking internal abstract class ThemableActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { val getAppStyle = requireDependency().getAppStyle() val initialStyle = runBlocking { getAppStyle().first() }.style diff --git a/app/src/main/kotlin/io/github/wykopmobilny/di/modules/NetworkModule.kt b/app/src/main/kotlin/io/github/wykopmobilny/di/modules/NetworkModule.kt index 26d2aa505..e2a127d06 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/di/modules/NetworkModule.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/di/modules/NetworkModule.kt @@ -4,8 +4,6 @@ import android.app.NotificationManager import android.content.Context import dagger.Module import dagger.Provides -import io.github.wykopmobilny.api.UserTokenRefresher -import io.github.wykopmobilny.api.user.LoginApi import io.github.wykopmobilny.base.WykopSchedulers import io.github.wykopmobilny.ui.modules.Navigator import io.github.wykopmobilny.ui.modules.NavigatorApi diff --git a/app/src/main/kotlin/io/github/wykopmobilny/initializers/CrashlyticsInitializer.kt b/app/src/main/kotlin/io/github/wykopmobilny/initializers/CrashlyticsInitializer.kt index f25d12c75..1ffb96901 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/initializers/CrashlyticsInitializer.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/initializers/CrashlyticsInitializer.kt @@ -16,5 +16,3 @@ internal class CrashlyticsInitializer : Initializer { override fun dependencies() = emptyList>>() } - - diff --git a/app/src/main/kotlin/io/github/wykopmobilny/models/mapper/apiv2/LinkCommentMapper.kt b/app/src/main/kotlin/io/github/wykopmobilny/models/mapper/apiv2/LinkCommentMapper.kt index 43ce28826..21b164bf5 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/models/mapper/apiv2/LinkCommentMapper.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/models/mapper/apiv2/LinkCommentMapper.kt @@ -3,10 +3,6 @@ package io.github.wykopmobilny.models.mapper.apiv2 import io.github.wykopmobilny.api.filters.OWMContentFilter import io.github.wykopmobilny.api.responses.LinkCommentResponse import io.github.wykopmobilny.models.dataclass.LinkComment -import kotlinx.datetime.TimeZone -import kotlinx.datetime.toLocalDateTime -import org.threeten.bp.LocalDateTime -import org.threeten.bp.Month object LinkCommentMapper { diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/NoProgressLinkAdapter.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/NoProgressLinkAdapter.kt index 5734533a8..a277e73dd 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/NoProgressLinkAdapter.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/NoProgressLinkAdapter.kt @@ -24,7 +24,6 @@ class NoProgressLinkAdapter @Inject constructor( val items = mutableListOf() lateinit var linksActionListener: LinkActionListener - private val linkShowImage by lazy { settingsPreferencesApi.linkShowImage } private val showMinifiedImages by lazy { settingsPreferencesApi.showMinifiedImages } private val linkSimpleList by lazy { settingsPreferencesApi.linkSimpleList } diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkHeaderViewHolder.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkHeaderViewHolder.kt index 3eaff0828..58afd9a48 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkHeaderViewHolder.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkHeaderViewHolder.kt @@ -10,7 +10,6 @@ import io.github.wykopmobilny.databinding.LinkBuryMenuBottomsheetBinding import io.github.wykopmobilny.databinding.LinkDetailsHeaderLayoutBinding import io.github.wykopmobilny.databinding.LinkMenuBottomsheetBinding import io.github.wykopmobilny.models.dataclass.Link -import io.github.wykopmobilny.storage.api.SettingsPreferencesApi import io.github.wykopmobilny.ui.fragments.link.LinkHeaderActionListener import io.github.wykopmobilny.ui.fragments.link.LinkInteractor import io.github.wykopmobilny.ui.modules.NewNavigator diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkViewHolder.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkViewHolder.kt index bff003c41..bf75cc898 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkViewHolder.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/LinkViewHolder.kt @@ -72,7 +72,6 @@ class LinkViewHolder( } } - private var type: Int = TYPE_IMAGE private lateinit var previewImageView: ImageView diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/TopLinkCommentViewHolder.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/TopLinkCommentViewHolder.kt index 15409c4d2..afe1f6795 100755 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/TopLinkCommentViewHolder.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/adapters/viewholders/TopLinkCommentViewHolder.kt @@ -90,14 +90,16 @@ class TopLinkCommentViewHolder( showAdultContent: Boolean, hideNsfw: Boolean ) { - super.bindView(linkComment, + super.bindView( + linkComment, isAuthorComment, commentId, openSpoilersDialog, enableYoutubePlayer, enableEmbedPlayer, showAdultContent, - hideNsfw) + hideNsfw + ) binding.authorHeaderView.setAuthorData(linkComment.author, linkComment.date, linkComment.app) if (linkComment.isCollapsed) { diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivityV2.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivityV2.kt index 2827396bf..059c69516 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivityV2.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivityV2.kt @@ -37,7 +37,7 @@ internal class LinkDetailsActivityV2 : ThemableActivity() { fun createIntent(context: Context, linkId: Long, commentId: Long? = null) = Intent(context, LinkDetailsActivityV2::class.java).apply { putExtra(EXTRA_LINK_ID, linkId) - commentId?.let{ putExtra(EXTRA_COMMENT_ID, it) } + commentId?.let { putExtra(EXTRA_COMMENT_ID, it) } } } } diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mainnavigation/MainNavigationPresenter.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mainnavigation/MainNavigationPresenter.kt index 52b71d63a..5d89cf9d8 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mainnavigation/MainNavigationPresenter.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mainnavigation/MainNavigationPresenter.kt @@ -7,7 +7,6 @@ import io.github.wykopmobilny.utils.intoComposite import io.github.wykopmobilny.utils.usermanager.UserManagerApi import io.github.wykopmobilny.utils.usermanager.isUserAuthorized import io.reactivex.Observable -import io.reactivex.disposables.CompositeDisposable import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mikroblog/entry/EntryActivity.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mikroblog/entry/EntryActivity.kt index 1bb88fdc7..c3f92b294 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mikroblog/entry/EntryActivity.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/mikroblog/entry/EntryActivity.kt @@ -1,7 +1,6 @@ package io.github.wykopmobilny.ui.modules.mikroblog.entry import android.app.Activity -import android.app.Application import android.content.Context import android.content.Intent import android.net.Uri @@ -206,7 +205,7 @@ class EntryActivity : } override fun openGalleryImageChooser() { - contract.launch( "image/*") + contract.launch("image/*") } override fun onBackPressed() { diff --git a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/twofactor/TwoFactorAuthorizationActivity.kt b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/twofactor/TwoFactorAuthorizationActivity.kt index 04664dfd7..d0ce5e268 100644 --- a/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/twofactor/TwoFactorAuthorizationActivity.kt +++ b/app/src/main/kotlin/io/github/wykopmobilny/ui/modules/twofactor/TwoFactorAuthorizationActivity.kt @@ -10,7 +10,6 @@ import io.github.wykopmobilny.utils.viewBinding internal class TwoFactorAuthorizationActivity : ThemableActivity() { - private val binding by viewBinding(ActivityContainerBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index df5a25792..4268b4434 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -10,14 +10,14 @@ repositories { dependencies { implementation(gradleApi()) - implementation("com.project.starter:android:0.41.0") + implementation("com.project.starter:android:0.42.0") implementation("com.gradleup:auto-manifest-plugin:1.0.4") implementation("com.google.gms:google-services:4.3.10") implementation("com.google.firebase:firebase-crashlytics-gradle:2.8.1") - implementation("com.slack.keeper:keeper:0.11.1") + implementation("com.slack.keeper:keeper:0.12.0") implementation("com.google.firebase:perf-plugin:1.4.1") implementation("com.squareup.sqldelight:gradle-plugin:1.5.3") - implementation("com.android.tools:common:30.0.4") + implementation("com.android.tools:common:30.1.1") implementation("com.karumi:shot:5.13.0") implementation("pl.droidsonroids.gradle:plugin:1.0.9") } diff --git a/data/framework/android/src/main/AndroidManifest.xml b/data/framework/android/src/main/AndroidManifest.xml index e7fea3f03..6a8699d31 100644 --- a/data/framework/android/src/main/AndroidManifest.xml +++ b/data/framework/android/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ + diff --git a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidAppGateway.kt b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidAppGateway.kt index d2c15d55e..cba0bd0ce 100644 --- a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidAppGateway.kt +++ b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidAppGateway.kt @@ -77,6 +77,7 @@ private fun knownAppId(app: ExternalApp) = when (app) { YoutubeApp.Official -> "com.google.android.youtube" YoutubeApp.Vanced -> "com.vanced.android.youtube" + YoutubeApp.NewPipe -> "org.schabi.newpipe" AuthenticatorApp.Google -> "com.google.android.apps.authenticator2" AuthenticatorApp.Microsoft -> "com.azure.authenticator" AuthenticatorApp.Authy -> "com.authy.authy" diff --git a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidSystemSettingsDetector.kt b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidSystemSettingsDetector.kt index 9687963a5..2f8555250 100644 --- a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidSystemSettingsDetector.kt +++ b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/AndroidSystemSettingsDetector.kt @@ -8,13 +8,10 @@ import io.github.wykopmobilny.domain.navigation.NavigationMode import io.github.wykopmobilny.domain.navigation.NightModeState import io.github.wykopmobilny.domain.navigation.SystemSettingsDetector import io.github.wykopmobilny.ui.base.AppDispatchers -import io.github.wykopmobilny.ui.base.AppScopes import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async -import kotlinx.coroutines.flow.flow -import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.withContext import javax.inject.Inject diff --git a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/FrameworkComponent.kt b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/FrameworkComponent.kt index 9298b8099..c06cb765d 100644 --- a/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/FrameworkComponent.kt +++ b/data/framework/android/src/main/kotlin/io/github/wykopmobilny/domain/navigation/android/FrameworkComponent.kt @@ -4,7 +4,6 @@ import android.app.Application import dagger.BindsInstance import dagger.Component import io.github.wykopmobilny.domain.navigation.Framework -import io.github.wykopmobilny.ui.base.AppScopes import kotlinx.coroutines.CoroutineScope @Component(modules = [FrameworkModule::class]) diff --git a/data/framework/api/src/main/kotlin/io/github/wykopmobilny/domain/navigation/AppGateway.kt b/data/framework/api/src/main/kotlin/io/github/wykopmobilny/domain/navigation/AppGateway.kt index 5b1b084b7..1ac7f0217 100644 --- a/data/framework/api/src/main/kotlin/io/github/wykopmobilny/domain/navigation/AppGateway.kt +++ b/data/framework/api/src/main/kotlin/io/github/wykopmobilny/domain/navigation/AppGateway.kt @@ -16,6 +16,7 @@ sealed interface ExternalApp enum class YoutubeApp : ExternalApp { Official, Vanced, + NewPipe, } enum class AuthenticatorApp : ExternalApp { diff --git a/data/work/android/src/main/kotlin/io/github/wykopmobilny/work/RefreshBlacklistRequest.kt b/data/work/android/src/main/kotlin/io/github/wykopmobilny/work/RefreshBlacklistRequest.kt index b2fe10053..3b398028d 100644 --- a/data/work/android/src/main/kotlin/io/github/wykopmobilny/work/RefreshBlacklistRequest.kt +++ b/data/work/android/src/main/kotlin/io/github/wykopmobilny/work/RefreshBlacklistRequest.kt @@ -4,7 +4,6 @@ import android.content.Context import androidx.work.CoroutineWorker import androidx.work.WorkerParameters import io.github.aakira.napier.Napier -import kotlinx.coroutines.flow.first internal class RefreshBlacklistRequest( context: Context, diff --git a/domain/src/main/kotlin/io/github/wykopmobilny/domain/settings/prefs/GetMediaPreferences.kt b/domain/src/main/kotlin/io/github/wykopmobilny/domain/settings/prefs/GetMediaPreferences.kt index 3ac9c805e..37f8ac338 100644 --- a/domain/src/main/kotlin/io/github/wykopmobilny/domain/settings/prefs/GetMediaPreferences.kt +++ b/domain/src/main/kotlin/io/github/wykopmobilny/domain/settings/prefs/GetMediaPreferences.kt @@ -30,7 +30,8 @@ internal class GetMediaPreferences @Inject constructor( appStorage.get(UserSettings.useYoutubePlayer) .flatMapLatest { savedValue -> if (savedValue == null) { - appGateway.getInstalledYoutubeApps().map { it.contains(YoutubeApp.Official) } + appGateway.getInstalledYoutubeApps() + .map { apps -> apps.singleOrNull() == YoutubeApp.Official } } else { flowOf(savedValue) } diff --git a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/FragmentViewBindingDelegate.kt b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/FragmentViewBindingDelegate.kt index 393f61f86..364d398a7 100644 --- a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/FragmentViewBindingDelegate.kt +++ b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/FragmentViewBindingDelegate.kt @@ -3,7 +3,6 @@ package io.github.wykopmobilny.utils import android.view.View import androidx.fragment.app.Fragment import androidx.lifecycle.DefaultLifecycleObserver -import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.Observer import androidx.viewbinding.ViewBinding diff --git a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/DialogBinding.kt b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/DialogBinding.kt index 9ea8cedba..61e7584e3 100644 --- a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/DialogBinding.kt +++ b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/DialogBinding.kt @@ -51,8 +51,6 @@ suspend fun Flow.collectInfoDialog(context: Context) { .show().also { it?.findViewById(android.R.id.message)?.movementMethod = LinkMovementMethod.getInstance() } - - } else { null } diff --git a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/PickerBinding.kt b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/PickerBinding.kt index 87bbbe09e..50fb433df 100644 --- a/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/PickerBinding.kt +++ b/ui/base/android/src/main/kotlin/io/github/wykopmobilny/utils/bindings/PickerBinding.kt @@ -93,6 +93,5 @@ private class PickerListAdapter : ListAdapter ColorStateList.valueOf(Color.TRANSPARENT) } - diff --git a/ui/components/widgets/android/src/main/kotlin/com/github/wykopmobilny/ui/components/utils/ContextUtils.kt b/ui/components/widgets/android/src/main/kotlin/com/github/wykopmobilny/ui/components/utils/ContextUtils.kt index 160c401bb..f3755978c 100644 --- a/ui/components/widgets/android/src/main/kotlin/com/github/wykopmobilny/ui/components/utils/ContextUtils.kt +++ b/ui/components/widgets/android/src/main/kotlin/com/github/wykopmobilny/ui/components/utils/ContextUtils.kt @@ -50,6 +50,5 @@ fun Context.readAttr(@AttrRes attrColor: Int): Int { return typedValue.resourceId } - val View.layoutInflater: LayoutInflater get() = LayoutInflater.from(context) diff --git a/ui/link-details/android/src/main/kotlin/io/github/wykopmobilny/links/details/LinkDetailsAdapter.kt b/ui/link-details/android/src/main/kotlin/io/github/wykopmobilny/links/details/LinkDetailsAdapter.kt index d5e6a93c2..61af964ce 100644 --- a/ui/link-details/android/src/main/kotlin/io/github/wykopmobilny/links/details/LinkDetailsAdapter.kt +++ b/ui/link-details/android/src/main/kotlin/io/github/wykopmobilny/links/details/LinkDetailsAdapter.kt @@ -120,7 +120,6 @@ private val LinkCommentUi.id is LinkCommentUi.Normal -> id } - @OptIn(ExperimentalStdlibApi::class) internal fun LinkDetailsUi.toAdapterList(): List = buildList { add(ListItem.Header(header)) diff --git a/ui/notifications/android/src/main/kotlin/io/github/wykopmobilny/notification/AndroidNotificationManager.kt b/ui/notifications/android/src/main/kotlin/io/github/wykopmobilny/notification/AndroidNotificationManager.kt index 6644e227b..e5e6bfe3e 100644 --- a/ui/notifications/android/src/main/kotlin/io/github/wykopmobilny/notification/AndroidNotificationManager.kt +++ b/ui/notifications/android/src/main/kotlin/io/github/wykopmobilny/notification/AndroidNotificationManager.kt @@ -52,7 +52,6 @@ internal class AndroidNotificationManager @Inject constructor( ), ) .build() - } } @@ -103,4 +102,3 @@ internal class NotificationDismissedReceiver : BroadcastReceiver() { runBlocking { dependencies.handleNotificationDismissed().invoke() } } } - diff --git a/ui/settings/android/src/androidTest/kotlin/io/github/wykopmobilny/ui/settings/android/GeneralPreferencesFragmentTest.kt b/ui/settings/android/src/androidTest/kotlin/io/github/wykopmobilny/ui/settings/android/GeneralPreferencesFragmentTest.kt index 32ee7ce66..5ee11f984 100644 --- a/ui/settings/android/src/androidTest/kotlin/io/github/wykopmobilny/ui/settings/android/GeneralPreferencesFragmentTest.kt +++ b/ui/settings/android/src/androidTest/kotlin/io/github/wykopmobilny/ui/settings/android/GeneralPreferencesFragmentTest.kt @@ -2,7 +2,12 @@ package io.github.wykopmobilny.ui.settings.android import io.github.wykopmobilny.screenshots.BaseScreenshotTest import io.github.wykopmobilny.screenshots.unboundedHeight -import io.github.wykopmobilny.ui.settings.* +import io.github.wykopmobilny.ui.settings.AppThemeUi +import io.github.wykopmobilny.ui.settings.AppearancePreferencesUi +import io.github.wykopmobilny.ui.settings.FontSizeUi +import io.github.wykopmobilny.ui.settings.LinkImagePositionUi +import io.github.wykopmobilny.ui.settings.MainScreenUi +import io.github.wykopmobilny.ui.settings.MikroblogScreenUi import org.junit.Test internal class GeneralPreferencesFragmentTest : BaseScreenshotTest() {