Loading domain/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 29 compileSdkVersion 30 compileOptions { sourceCompatibility 1.8 Loading presentation/build.gradle +5 −5 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 29 compileSdkVersion 30 flavorDimensions "analytics" defaultConfig { applicationId "foundation.e.message" minSdkVersion 21 targetSdkVersion 29 targetSdkVersion 30 versionCode 2218 versionName "3.9.4" setProperty("archivesBaseName", "QKSMS-v${versionName}") Loading Loading @@ -63,12 +63,12 @@ android { } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } // For Kotlin projects kotlinOptions { jvmTarget = "1.8" jvmTarget = "11" } lintOptions { Loading presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt +22 −21 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import androidx.recyclerview.widget.ItemTouchHelper import com.moez.QKSMS.R import com.moez.QKSMS.common.Navigator import com.moez.QKSMS.common.base.QkViewModel import com.moez.QKSMS.common.util.BillingManager import com.moez.QKSMS.extensions.mapNotNull import com.moez.QKSMS.interactor.DeleteConversations import com.moez.QKSMS.interactor.MarkAllSeen Loading @@ -38,6 +38,7 @@ import com.moez.QKSMS.interactor.SyncContacts import com.moez.QKSMS.interactor.SyncMessages import com.moez.QKSMS.listener.ContactAddedListener import com.moez.QKSMS.manager.BillingManager import com.moez.QKSMS.manager.ChangelogManager import com.moez.QKSMS.manager.PermissionManager import com.moez.QKSMS.manager.RatingManager Loading presentation/src/main/java/com/moez/QKSMS/feature/themepicker/ThemePagerAdapter.kt 0 → 100644 +55 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com> * * This file is part of QKSMS. * * QKSMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QKSMS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with QKSMS. If not, see <http://www.gnu.org/licenses/>. */ package com.moez.QKSMS.feature.themepicker import android.content.Context import android.view.View import android.view.ViewGroup import androidx.viewpager.widget.PagerAdapter import com.moez.QKSMS.R import javax.inject.Inject class ThemePagerAdapter @Inject constructor(private val context: Context) : PagerAdapter() { override fun instantiateItem(container: ViewGroup, position: Int): Any { return when (position) { 1 -> container.findViewById(R.id.hsvPicker) else -> container.findViewById(R.id.materialColors) } } override fun getPageTitle(position: Int): CharSequence? { return when (position) { 1 -> context.getString(R.string.theme_plus) else -> context.getString(R.string.theme_material) } } override fun isViewFromObject(view: View, `object`: Any): Boolean { return view == `object` } override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { } override fun getCount(): Int { return 2 } } No newline at end of file presentation/src/main/java/com/moez/QKSMS/feature/themepicker/ThemePickerView.kt 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com> * * This file is part of QKSMS. * * QKSMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QKSMS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with QKSMS. If not, see <http://www.gnu.org/licenses/>. */ package com.moez.QKSMS.feature.themepicker import com.moez.QKSMS.common.base.QkViewContract import io.reactivex.Observable interface ThemePickerView : QkViewContract<ThemePickerState> { fun themeSelected(): Observable<Int> fun hsvThemeSelected(): Observable<Int> fun clearHsvThemeClicks(): Observable<*> fun applyHsvThemeClicks(): Observable<*> fun viewQksmsPlusClicks(): Observable<*> fun setCurrentTheme(color: Int) fun showQksmsPlusSnackbar() } No newline at end of file Loading
domain/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 29 compileSdkVersion 30 compileOptions { sourceCompatibility 1.8 Loading
presentation/build.gradle +5 −5 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 29 compileSdkVersion 30 flavorDimensions "analytics" defaultConfig { applicationId "foundation.e.message" minSdkVersion 21 targetSdkVersion 29 targetSdkVersion 30 versionCode 2218 versionName "3.9.4" setProperty("archivesBaseName", "QKSMS-v${versionName}") Loading Loading @@ -63,12 +63,12 @@ android { } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } // For Kotlin projects kotlinOptions { jvmTarget = "1.8" jvmTarget = "11" } lintOptions { Loading
presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt +22 −21 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import androidx.recyclerview.widget.ItemTouchHelper import com.moez.QKSMS.R import com.moez.QKSMS.common.Navigator import com.moez.QKSMS.common.base.QkViewModel import com.moez.QKSMS.common.util.BillingManager import com.moez.QKSMS.extensions.mapNotNull import com.moez.QKSMS.interactor.DeleteConversations import com.moez.QKSMS.interactor.MarkAllSeen Loading @@ -38,6 +38,7 @@ import com.moez.QKSMS.interactor.SyncContacts import com.moez.QKSMS.interactor.SyncMessages import com.moez.QKSMS.listener.ContactAddedListener import com.moez.QKSMS.manager.BillingManager import com.moez.QKSMS.manager.ChangelogManager import com.moez.QKSMS.manager.PermissionManager import com.moez.QKSMS.manager.RatingManager Loading
presentation/src/main/java/com/moez/QKSMS/feature/themepicker/ThemePagerAdapter.kt 0 → 100644 +55 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com> * * This file is part of QKSMS. * * QKSMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QKSMS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with QKSMS. If not, see <http://www.gnu.org/licenses/>. */ package com.moez.QKSMS.feature.themepicker import android.content.Context import android.view.View import android.view.ViewGroup import androidx.viewpager.widget.PagerAdapter import com.moez.QKSMS.R import javax.inject.Inject class ThemePagerAdapter @Inject constructor(private val context: Context) : PagerAdapter() { override fun instantiateItem(container: ViewGroup, position: Int): Any { return when (position) { 1 -> container.findViewById(R.id.hsvPicker) else -> container.findViewById(R.id.materialColors) } } override fun getPageTitle(position: Int): CharSequence? { return when (position) { 1 -> context.getString(R.string.theme_plus) else -> context.getString(R.string.theme_material) } } override fun isViewFromObject(view: View, `object`: Any): Boolean { return view == `object` } override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { } override fun getCount(): Int { return 2 } } No newline at end of file
presentation/src/main/java/com/moez/QKSMS/feature/themepicker/ThemePickerView.kt 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com> * * This file is part of QKSMS. * * QKSMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QKSMS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with QKSMS. If not, see <http://www.gnu.org/licenses/>. */ package com.moez.QKSMS.feature.themepicker import com.moez.QKSMS.common.base.QkViewContract import io.reactivex.Observable interface ThemePickerView : QkViewContract<ThemePickerState> { fun themeSelected(): Observable<Int> fun hsvThemeSelected(): Observable<Int> fun clearHsvThemeClicks(): Observable<*> fun applyHsvThemeClicks(): Observable<*> fun viewQksmsPlusClicks(): Observable<*> fun setCurrentTheme(color: Int) fun showQksmsPlusSnackbar() } No newline at end of file