Reorganize package structure to adhere to offical Kotlin style guide

This commit is contained in:
Moez Bhatti
2018-01-02 17:13:27 -05:00
parent 8cd5ec31c8
commit a5ce40a404
136 changed files with 429 additions and 431 deletions
@@ -16,7 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS
import android.support.test.filters.MediumTest import android.support.test.filters.MediumTest
import android.support.test.runner.AndroidJUnit4 import android.support.test.runner.AndroidJUnit4
+15 -15
View File
@@ -12,7 +12,7 @@
<uses-permission android:name="android.permission.WRITE_SMS" /> <uses-permission android:name="android.permission.WRITE_SMS" />
<application <application
android:name=".common.QKApplication" android:name="common.QKApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
@@ -21,7 +21,7 @@
android:theme="@style/AppThemeLight"> android:theme="@style/AppThemeLight">
<activity <activity
android:name="com.moez.QKSMS.presentation.main.MainActivity" android:name="presentation.main.MainActivity"
android:launchMode="singleTask"> android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -45,39 +45,39 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="com.moez.QKSMS.presentation.compose.ComposeActivity" android:name="presentation.compose.ComposeActivity"
android:parentActivityName=".presentation.main.MainActivity" /> android:parentActivityName="presentation.main.MainActivity" />
<activity android:name=".presentation.settings.SettingsActivity" /> <activity android:name="presentation.settings.SettingsActivity" />
<activity android:name=".presentation.setup.SetupActivity" /> <activity android:name="presentation.setup.SetupActivity" />
<receiver android:name=".receiver.DefaultSmsChangedReceiver"> <receiver android:name="receiver.DefaultSmsChangedReceiver">
<intent-filter> <intent-filter>
<action android:name="android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED" /> <action android:name="android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver <receiver
android:name=".receiver.SmsReceiver" android:name="receiver.SmsReceiver"
android:permission="android.permission.BROADCAST_SMS"> android:permission="android.permission.BROADCAST_SMS">
<intent-filter> <intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" /> <action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver <receiver
android:name=".receiver.MmsReceiver" android:name="receiver.MmsReceiver"
android:permission="android.permission.BROADCAST_WAP_PUSH"> android:permission="android.permission.BROADCAST_WAP_PUSH">
<intent-filter> <intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" /> <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" /> <data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver android:name=".receiver.MessageSentReceiver" /> <receiver android:name="receiver.MessageSentReceiver" />
<receiver android:name=".receiver.MessageDeliveredReceiver" /> <receiver android:name="receiver.MessageDeliveredReceiver" />
<receiver android:name=".receiver.MarkSeenReceiver" /> <receiver android:name="receiver.MarkSeenReceiver" />
<receiver android:name=".receiver.MarkReadReceiver" /> <receiver android:name="receiver.MarkReadReceiver" />
<receiver android:name=".receiver.RemoteMessagingReceiver" /> <receiver android:name="receiver.RemoteMessagingReceiver" />
<service <service
android:name=".service.HeadlessSmsSendService" android:name="service.HeadlessSmsSendService"
android:exported="true" android:exported="true"
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"> android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE">
<intent-filter> <intent-filter>
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common package common
import android.app.Application import android.app.Application
import com.bugsnag.android.Bugsnag import com.bugsnag.android.Bugsnag
import com.moez.QKSMS.BuildConfig import com.moez.QKSMS.BuildConfig
import com.moez.QKSMS.common.di.AppComponentManager import common.di.AppComponentManager
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Analytics import common.util.Analytics
import io.realm.Realm import io.realm.Realm
import io.realm.RealmConfiguration import io.realm.RealmConfiguration
import timber.log.Timber import timber.log.Timber
@@ -16,21 +16,21 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.di package common.di
import com.moez.QKSMS.common.QKApplication import common.QKApplication
import com.moez.QKSMS.common.util.ContactImageLoader import common.util.ContactImageLoader
import com.moez.QKSMS.presentation.common.widget.* import presentation.common.widget.*
import com.moez.QKSMS.presentation.compose.ComposeActivity import presentation.compose.ComposeActivity
import com.moez.QKSMS.presentation.compose.ComposeViewModel import presentation.compose.ComposeViewModel
import com.moez.QKSMS.presentation.compose.DetailedChipView import presentation.compose.DetailedChipView
import com.moez.QKSMS.presentation.main.MainActivity import presentation.main.MainActivity
import com.moez.QKSMS.presentation.main.MainViewModel import presentation.main.MainViewModel
import com.moez.QKSMS.presentation.settings.SettingsActivity import presentation.settings.SettingsActivity
import com.moez.QKSMS.presentation.settings.SettingsViewModel import presentation.settings.SettingsViewModel
import com.moez.QKSMS.presentation.setup.SetupActivity import presentation.setup.SetupActivity
import com.moez.QKSMS.presentation.setup.SetupViewModel import presentation.setup.SetupViewModel
import com.moez.QKSMS.receiver.* import receiver.*
import dagger.Component import dagger.Component
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.di package common.di
import com.moez.QKSMS.common.QKApplication import common.QKApplication
internal lateinit var appComponent: AppComponent internal lateinit var appComponent: AppComponent
private set private set
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.di package common.di
import android.app.Application import android.app.Application
import android.content.Context import android.content.Context
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.Context import android.content.Context
import com.amplitude.api.Amplitude import com.amplitude.api.Amplitude
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.ClipData import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.Context import android.content.Context
import android.provider.ContactsContract import android.provider.ContactsContract
@@ -29,8 +29,8 @@ import com.bumptech.glide.load.data.DataFetcher
import com.bumptech.glide.load.model.ModelLoader import com.bumptech.glide.load.model.ModelLoader
import com.bumptech.glide.load.model.ModelLoaderFactory import com.bumptech.glide.load.model.ModelLoaderFactory
import com.bumptech.glide.load.model.MultiModelLoaderFactory import com.bumptech.glide.load.model.MultiModelLoaderFactory
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.data.repository.ContactRepository import data.repository.ContactRepository
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import java.io.InputStream import java.io.InputStream
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.Context import android.content.Context
import android.text.format.DateFormat import android.text.format.DateFormat
import com.moez.QKSMS.common.util.extensions.isSameDay import common.util.extensions.isSameDay
import com.moez.QKSMS.common.util.extensions.isSameWeek import common.util.extensions.isSameWeek
import com.moez.QKSMS.common.util.extensions.isSameYear import common.util.extensions.isSameYear
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
import javax.inject.Inject import javax.inject.Inject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.Context import android.content.Context
import android.util.Log import android.util.Log
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import com.moez.QKSMS.data.model.Message import data.model.Message
import io.realm.Realm import io.realm.Realm
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.arch.lifecycle.LiveData import android.arch.lifecycle.LiveData
import io.realm.RealmChangeListener import io.realm.RealmChangeListener
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.text.TextUtils import android.text.TextUtils
import android.util.Patterns import android.util.Patterns
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.NotificationChannel import android.app.NotificationChannel
@@ -31,12 +31,12 @@ import android.support.v4.app.NotificationManagerCompat
import android.support.v4.app.RemoteInput import android.support.v4.app.RemoteInput
import android.support.v4.app.TaskStackBuilder import android.support.v4.app.TaskStackBuilder
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import com.moez.QKSMS.domain.interactor.MarkUnarchived import interactor.MarkUnarchived
import com.moez.QKSMS.presentation.compose.ComposeActivity import presentation.compose.ComposeActivity
import com.moez.QKSMS.receiver.MarkReadReceiver import receiver.MarkReadReceiver
import com.moez.QKSMS.receiver.MarkSeenReceiver import receiver.MarkSeenReceiver
import com.moez.QKSMS.receiver.RemoteMessagingReceiver import receiver.RemoteMessagingReceiver
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -17,7 +17,7 @@
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
data class Optional<out T>(val value: T?) { data class Optional<out T>(val value: T?) {
fun notNull() = value != null fun notNull() = value != null
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.Manifest import android.Manifest
import android.content.Context import android.content.Context
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.provider.Settings import android.provider.Settings
import com.f2prateek.rx.preferences2.RxSharedPreferences import com.f2prateek.rx.preferences2.RxSharedPreferences
@@ -16,18 +16,18 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package common.util
import android.content.Context import android.content.Context
import com.moez.QKSMS.common.util.extensions.map import common.util.extensions.map
import com.moez.QKSMS.common.util.extensions.mapWhile import common.util.extensions.mapWhile
import com.moez.QKSMS.data.mapper.CursorToConversation import data.mapper.CursorToConversation
import com.moez.QKSMS.data.mapper.CursorToMessage import data.mapper.CursorToMessage
import com.moez.QKSMS.data.mapper.CursorToRecipient import data.mapper.CursorToRecipient
import com.moez.QKSMS.data.model.Conversation import data.model.Conversation
import com.moez.QKSMS.data.model.Message import data.model.Message
import com.moez.QKSMS.data.model.Recipient import data.model.Recipient
import com.moez.QKSMS.data.model.SyncLog import data.model.SyncLog
import io.realm.Realm import io.realm.Realm
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import java.util.* import java.util.*
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import android.content.Context import android.content.Context
import android.support.annotation.StringRes import android.support.annotation.StringRes
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import android.database.Cursor import android.database.Cursor
import io.reactivex.Flowable import io.reactivex.Flowable
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import android.content.Context import android.content.Context
import android.graphics.Color import android.graphics.Color
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import io.reactivex.Observable import io.reactivex.Observable
import io.realm.Realm import io.realm.Realm
@@ -17,9 +17,9 @@
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import com.moez.QKSMS.common.util.Optional import common.util.Optional
import io.reactivex.Flowable import io.reactivex.Flowable
fun <T, R> Flowable<T>.mapNotNull(mapper: (T) -> R?): Flowable<R> fun <T, R> Flowable<T>.mapNotNull(mapper: (T) -> R?): Flowable<R>
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.extensions package common.util.extensions
import android.content.Context import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.filter package common.util.filter
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import javax.inject.Inject import javax.inject.Inject
class ContactFilter @Inject constructor(private val phoneNumberFilter: PhoneNumberFilter) : Filter<Contact>() { class ContactFilter @Inject constructor(private val phoneNumberFilter: PhoneNumberFilter) : Filter<Contact>() {
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.filter package common.util.filter
import com.moez.QKSMS.data.model.Conversation import data.model.Conversation
import javax.inject.Inject import javax.inject.Inject
class ConversationFilter @Inject constructor(private val recipientFilter: RecipientFilter) : Filter<Conversation>() { class ConversationFilter @Inject constructor(private val recipientFilter: RecipientFilter) : Filter<Conversation>() {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.filter package common.util.filter
abstract class Filter<in T> { abstract class Filter<in T> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.filter package common.util.filter
import android.telephony.PhoneNumberUtils import android.telephony.PhoneNumberUtils
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util.filter package common.util.filter
import com.moez.QKSMS.data.model.Recipient import data.model.Recipient
import javax.inject.Inject import javax.inject.Inject
class RecipientFilter @Inject constructor( class RecipientFilter @Inject constructor(
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.mapper package data.mapper
import android.database.Cursor import android.database.Cursor
import android.provider.ContactsContract import android.provider.ContactsContract
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.PhoneNumber import data.model.PhoneNumber
import javax.inject.Inject import javax.inject.Inject
class CursorToContact @Inject constructor() : Mapper<Cursor, Contact> { class CursorToContact @Inject constructor() : Mapper<Cursor, Contact> {
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.mapper package data.mapper
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.provider.Telephony.Threads import android.provider.Telephony.Threads
import com.moez.QKSMS.data.model.Conversation import data.model.Conversation
import com.moez.QKSMS.data.model.Recipient import data.model.Recipient
import javax.inject.Inject import javax.inject.Inject
class CursorToConversation @Inject constructor() : Mapper<Cursor, Conversation> { class CursorToConversation @Inject constructor() : Mapper<Cursor, Conversation> {
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.mapper package data.mapper
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.provider.Telephony.* import android.provider.Telephony.*
import com.moez.QKSMS.data.model.Message import data.model.Message
import com.moez.QKSMS.data.model.Message.DeliveryStatus import data.model.Message.DeliveryStatus
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.mapper package data.mapper
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.data.model.Recipient import data.model.Recipient
import com.moez.QKSMS.data.repository.ContactRepository import data.repository.ContactRepository
import javax.inject.Inject import javax.inject.Inject
class CursorToRecipient @Inject constructor(private val contactRepository: ContactRepository) : Mapper<Cursor, Recipient> { class CursorToRecipient @Inject constructor(private val contactRepository: ContactRepository) : Mapper<Cursor, Recipient> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.mapper package data.mapper
interface Mapper<in From, out To> { interface Mapper<in From, out To> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import io.realm.RealmList import io.realm.RealmList
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import io.realm.RealmList import io.realm.RealmList
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
/** /**
* Groups a conversation with its latest message into a single model * Groups a conversation with its latest message into a single model
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import android.support.annotation.StringRes import android.support.annotation.StringRes
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import android.content.ContentUris import android.content.ContentUris
import android.net.Uri import android.net.Uri
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import android.net.Uri import android.net.Uri
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import io.realm.RealmObject import io.realm.RealmObject
import io.realm.annotations.PrimaryKey import io.realm.annotations.PrimaryKey
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.model package data.model
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.repository package data.repository
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import android.provider.BaseColumns import android.provider.BaseColumns
import android.provider.ContactsContract import android.provider.ContactsContract
import com.moez.QKSMS.common.util.extensions.asFlowable import common.util.extensions.asFlowable
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.PhoneNumber import data.model.PhoneNumber
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Single import io.reactivex.Single
import io.realm.Realm import io.realm.Realm
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.data.repository package data.repository
import android.content.ContentValues import android.content.ContentValues
import android.content.Context import android.content.Context
@@ -25,17 +25,17 @@ import android.provider.BaseColumns
import android.provider.Telephony import android.provider.Telephony
import android.provider.Telephony.Sms import android.provider.Telephony.Sms
import android.provider.Telephony.TextBasedSmsColumns import android.provider.Telephony.TextBasedSmsColumns
import com.moez.QKSMS.common.util.Keys import common.util.Keys
import com.moez.QKSMS.common.util.MessageUtils import common.util.MessageUtils
import com.moez.QKSMS.common.util.extensions.asFlowable import common.util.extensions.asFlowable
import com.moez.QKSMS.common.util.extensions.asMaybe import common.util.extensions.asMaybe
import com.moez.QKSMS.common.util.extensions.insertOrUpdate import common.util.extensions.insertOrUpdate
import com.moez.QKSMS.common.util.extensions.mapNotNull import common.util.extensions.mapNotNull
import com.moez.QKSMS.data.mapper.CursorToConversation import data.mapper.CursorToConversation
import com.moez.QKSMS.data.mapper.CursorToRecipient import data.mapper.CursorToRecipient
import com.moez.QKSMS.data.model.Conversation import data.model.Conversation
import com.moez.QKSMS.data.model.InboxItem import data.model.InboxItem
import com.moez.QKSMS.data.model.Message import data.model.Message
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Maybe import io.reactivex.Maybe
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import android.content.Context import android.content.Context
import com.moez.QKSMS.common.util.extensions.asFlowable import common.util.extensions.asFlowable
import com.moez.QKSMS.common.util.extensions.insertOrUpdate import common.util.extensions.insertOrUpdate
import com.moez.QKSMS.data.mapper.CursorToContact import data.mapper.CursorToContact
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import io.reactivex.Flowable import io.reactivex.Flowable
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.common.util.SyncManager import common.util.SyncManager
import io.reactivex.Flowable import io.reactivex.Flowable
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import javax.inject.Inject import javax.inject.Inject
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.common.util.NotificationManager import common.util.NotificationManager
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.common.util.Keys import common.util.Keys
import com.moez.QKSMS.common.util.Permissions import common.util.Permissions
import com.moez.QKSMS.common.util.SyncManager import common.util.SyncManager
import io.reactivex.Flowable import io.reactivex.Flowable
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import com.moez.QKSMS.common.util.NotificationManager import common.util.NotificationManager
import com.moez.QKSMS.common.util.extensions.mapNotNull import common.util.extensions.mapNotNull
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,16 +16,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.domain.interactor package interactor
import android.app.PendingIntent import android.app.PendingIntent
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.telephony.SmsManager import android.telephony.SmsManager
import com.moez.QKSMS.common.util.Preferences import common.util.Preferences
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import com.moez.QKSMS.receiver.MessageDeliveredReceiver import receiver.MessageDeliveredReceiver
import com.moez.QKSMS.receiver.MessageSentReceiver import receiver.MessageSentReceiver
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.rxkotlin.toFlowable import io.reactivex.rxkotlin.toFlowable
import javax.inject.Inject import javax.inject.Inject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation package presentation
import android.annotation.TargetApi import android.annotation.TargetApi
import android.arch.lifecycle.ViewModel import android.arch.lifecycle.ViewModel
@@ -27,14 +27,14 @@ import android.net.Uri
import android.os.Build import android.os.Build
import android.provider.Settings import android.provider.Settings
import android.provider.Telephony import android.provider.Telephony
import com.moez.QKSMS.common.util.NotificationManager import common.util.NotificationManager
import com.moez.QKSMS.presentation.compose.ComposeActivity import presentation.compose.ComposeActivity
import com.moez.QKSMS.presentation.compose.ComposeViewModel import presentation.compose.ComposeViewModel
import com.moez.QKSMS.presentation.main.MainViewModel import presentation.main.MainViewModel
import com.moez.QKSMS.presentation.settings.SettingsActivity import presentation.settings.SettingsActivity
import com.moez.QKSMS.presentation.settings.SettingsViewModel import presentation.settings.SettingsViewModel
import com.moez.QKSMS.presentation.setup.SetupActivity import presentation.setup.SetupActivity
import com.moez.QKSMS.presentation.setup.SetupViewModel import presentation.setup.SetupViewModel
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,16 +16,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common package presentation.common
import android.content.Context import android.content.Context
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.data.model.MenuItem import data.model.MenuItem
import com.moez.QKSMS.presentation.common.base.QkAdapter import presentation.common.base.QkAdapter
import com.moez.QKSMS.presentation.common.base.QkViewHolder import presentation.common.base.QkViewHolder
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
import kotlinx.android.synthetic.main.menu_list_item.view.* import kotlinx.android.synthetic.main.menu_list_item.view.*
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
import android.support.annotation.CallSuper import android.support.annotation.CallSuper
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.arch.lifecycle.ViewModelProviders import android.arch.lifecycle.ViewModelProviders
@@ -24,8 +24,8 @@ import android.os.Bundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
import android.support.v7.util.DiffUtil import android.support.v7.util.DiffUtil
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
interface QkView<in State> { interface QkView<in State> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
import android.view.View import android.view.View
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.base package presentation.common.base
import android.arch.lifecycle.ViewModel import android.arch.lifecycle.ViewModel
import android.support.annotation.CallSuper import android.support.annotation.CallSuper
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
@@ -27,12 +27,12 @@ import android.view.View
import android.widget.FrameLayout import android.widget.FrameLayout
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.GlideApp import common.util.GlideApp
import com.moez.QKSMS.common.util.extensions.setTint import common.util.extensions.setTint
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import kotlinx.android.synthetic.main.avatar_view.view.* import kotlinx.android.synthetic.main.avatar_view.view.*
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.support.constraint.ConstraintLayout import android.support.constraint.ConstraintLayout
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import kotlinx.android.synthetic.main.group_avatar_view.view.* import kotlinx.android.synthetic.main.group_avatar_view.view.*
class GroupAvatarView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ConstraintLayout(context, attrs) { class GroupAvatarView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ConstraintLayout(context, attrs) {
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.support.v7.widget.LinearLayoutCompat import android.support.v7.widget.LinearLayoutCompat
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.util.extensions.setVisible import common.util.extensions.setVisible
import kotlinx.android.synthetic.main.preference_view.view.* import kotlinx.android.synthetic.main.preference_view.view.*
class PreferenceView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : LinearLayoutCompat(context, attrs) { class PreferenceView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : LinearLayoutCompat(context, attrs) {
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.widget.EditText import android.widget.EditText
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.support.v7.widget.SwitchCompat import android.support.v7.widget.SwitchCompat
import android.util.AttributeSet import android.util.AttributeSet
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.extensions.withAlpha import common.util.extensions.withAlpha
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.widget.TextView import android.widget.TextView
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import javax.inject.Inject import javax.inject.Inject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.common.widget package presentation.common.widget
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.content.Context import android.content.Context
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
@@ -30,13 +30,13 @@ import com.google.android.flexbox.FlexboxLayoutManager
import com.jakewharton.rxbinding2.view.keys import com.jakewharton.rxbinding2.view.keys
import com.jakewharton.rxbinding2.widget.textChanges import com.jakewharton.rxbinding2.widget.textChanges
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.extensions.dpToPx import common.util.extensions.dpToPx
import com.moez.QKSMS.common.util.extensions.setBackgroundTint import common.util.extensions.setBackgroundTint
import com.moez.QKSMS.common.util.extensions.showKeyboard import common.util.extensions.showKeyboard
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.presentation.common.base.QkAdapter import presentation.common.base.QkAdapter
import com.moez.QKSMS.presentation.common.base.QkViewHolder import presentation.common.base.QkViewHolder
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
import kotlinx.android.synthetic.main.contact_chip.view.* import kotlinx.android.synthetic.main.contact_chip.view.*
import javax.inject.Inject import javax.inject.Inject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.app.AlertDialog import android.app.AlertDialog
import android.content.res.ColorStateList import android.content.res.ColorStateList
@@ -30,14 +30,14 @@ import com.google.android.flexbox.FlexboxLayoutManager
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.jakewharton.rxbinding2.widget.textChanges import com.jakewharton.rxbinding2.widget.textChanges
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.extensions.setBackgroundTint import common.util.extensions.setBackgroundTint
import com.moez.QKSMS.common.util.extensions.setTint import common.util.extensions.setTint
import com.moez.QKSMS.common.util.extensions.setVisible import common.util.extensions.setVisible
import com.moez.QKSMS.common.util.extensions.showKeyboard import common.util.extensions.showKeyboard
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.Message import data.model.Message
import com.moez.QKSMS.presentation.common.base.QkActivity import presentation.common.base.QkActivity
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.Message import data.model.Message
import io.realm.RealmResults import io.realm.RealmResults
data class ComposeState( data class ComposeState(
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.Message import data.model.Message
import com.moez.QKSMS.presentation.common.base.QkView import presentation.common.base.QkView
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
@@ -16,22 +16,22 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.content.Context import android.content.Context
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.ClipboardUtils import common.util.ClipboardUtils
import com.moez.QKSMS.common.util.extensions.asObservable import common.util.extensions.asObservable
import com.moez.QKSMS.common.util.extensions.makeToast import common.util.extensions.makeToast
import com.moez.QKSMS.common.util.filter.ContactFilter import common.util.filter.ContactFilter
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.Conversation import data.model.Conversation
import com.moez.QKSMS.data.repository.ContactRepository import data.repository.ContactRepository
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import com.moez.QKSMS.domain.interactor.* import interactor.*
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import com.moez.QKSMS.presentation.common.base.QkViewModel import presentation.common.base.QkViewModel
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.app.Activity import android.app.Activity
import android.graphics.Rect import android.graphics.Rect
@@ -16,16 +16,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.content.Context import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.presentation.common.base.QkAdapter import presentation.common.base.QkAdapter
import com.moez.QKSMS.presentation.common.base.QkViewHolder import presentation.common.base.QkViewHolder
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
import kotlinx.android.synthetic.main.contact_list_item.view.* import kotlinx.android.synthetic.main.contact_list_item.view.*
@@ -16,17 +16,17 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.content.Context import android.content.Context
import android.view.View import android.view.View
import android.view.animation.AlphaAnimation import android.view.animation.AlphaAnimation
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.extensions.setBackgroundTint import common.util.extensions.setBackgroundTint
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import kotlinx.android.synthetic.main.contact_chip_detailed.view.* import kotlinx.android.synthetic.main.contact_chip_detailed.view.*
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.compose package presentation.compose
import android.content.Context import android.content.Context
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
@@ -25,16 +25,16 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.jakewharton.rxbinding2.view.RxView import com.jakewharton.rxbinding2.view.RxView
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.DateFormatter import common.util.DateFormatter
import com.moez.QKSMS.common.util.extensions.dpToPx import common.util.extensions.dpToPx
import com.moez.QKSMS.common.util.extensions.setBackgroundTint import common.util.extensions.setBackgroundTint
import com.moez.QKSMS.common.util.extensions.setPadding import common.util.extensions.setPadding
import com.moez.QKSMS.common.util.extensions.setVisible import common.util.extensions.setVisible
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.Message import data.model.Message
import com.moez.QKSMS.data.model.PhoneNumber import data.model.PhoneNumber
import com.moez.QKSMS.presentation.common.base.QkViewHolder import presentation.common.base.QkViewHolder
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
import android.support.v7.widget.helper.ItemTouchHelper import android.support.v7.widget.helper.ItemTouchHelper
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import android.content.Context import android.content.Context
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
@@ -25,15 +25,15 @@ import android.view.ViewGroup
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.jakewharton.rxbinding2.view.longClicks import com.jakewharton.rxbinding2.view.longClicks
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.util.Colors import common.util.Colors
import com.moez.QKSMS.common.util.DateFormatter import common.util.DateFormatter
import com.moez.QKSMS.data.model.Contact import data.model.Contact
import com.moez.QKSMS.data.model.InboxItem import data.model.InboxItem
import com.moez.QKSMS.data.model.PhoneNumber import data.model.PhoneNumber
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import com.moez.QKSMS.presentation.common.base.FlowableAdapter import presentation.common.base.FlowableAdapter
import com.moez.QKSMS.presentation.common.base.QkViewHolder import presentation.common.base.QkViewHolder
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import android.app.AlertDialog import android.app.AlertDialog
import android.content.Intent import android.content.Intent
@@ -36,13 +36,10 @@ import com.jakewharton.rxbinding2.support.v4.widget.drawerOpen
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.jakewharton.rxbinding2.widget.textChanges import com.jakewharton.rxbinding2.widget.textChanges
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.extensions.dpToPx import common.util.extensions.dpToPx
import com.moez.QKSMS.common.util.extensions.setBackgroundTint import common.util.extensions.setBackgroundTint
import com.moez.QKSMS.common.util.extensions.setVisible import common.util.extensions.setVisible
import com.moez.QKSMS.presentation.Navigator
import com.moez.QKSMS.presentation.common.MenuItemAdapter
import com.moez.QKSMS.presentation.common.base.QkActivity
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
@@ -51,6 +48,9 @@ import io.reactivex.subjects.Subject
import kotlinx.android.synthetic.main.drawer_view.* import kotlinx.android.synthetic.main.drawer_view.*
import kotlinx.android.synthetic.main.main_activity.* import kotlinx.android.synthetic.main.main_activity.*
import kotlinx.android.synthetic.main.toolbar_search.* import kotlinx.android.synthetic.main.toolbar_search.*
import presentation.Navigator
import presentation.common.MenuItemAdapter
import presentation.common.base.QkActivity
import javax.inject.Inject import javax.inject.Inject
class MainActivity : QkActivity<MainViewModel>(), MainView { class MainActivity : QkActivity<MainViewModel>(), MainView {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import com.moez.QKSMS.data.model.InboxItem import data.model.InboxItem
import com.moez.QKSMS.data.model.MenuItem import data.model.MenuItem
import io.reactivex.Flowable import io.reactivex.Flowable
data class MainState( data class MainState(
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import com.moez.QKSMS.presentation.common.base.QkView import presentation.common.base.QkView
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.main package presentation.main
import android.Manifest import android.Manifest
import android.content.Context import android.content.Context
@@ -24,14 +24,14 @@ import android.content.pm.PackageManager
import android.provider.Telephony import android.provider.Telephony
import android.support.v4.content.ContextCompat import android.support.v4.content.ContextCompat
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.filter.ConversationFilter import common.util.filter.ConversationFilter
import com.moez.QKSMS.data.model.MenuItem import data.model.MenuItem
import com.moez.QKSMS.data.model.SyncLog import data.model.SyncLog
import com.moez.QKSMS.data.repository.MessageRepository import data.repository.MessageRepository
import com.moez.QKSMS.domain.interactor.* import interactor.*
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import com.moez.QKSMS.presentation.common.base.QkViewModel import presentation.common.base.QkViewModel
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import io.reactivex.rxkotlin.withLatestFrom import io.reactivex.rxkotlin.withLatestFrom
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.settings package presentation.settings
import android.app.AlertDialog import android.app.AlertDialog
import android.app.ProgressDialog import android.app.ProgressDialog
@@ -26,11 +26,11 @@ import android.support.v7.widget.RecyclerView
import com.google.android.flexbox.FlexboxLayoutManager import com.google.android.flexbox.FlexboxLayoutManager
import com.jakewharton.rxbinding2.view.clicks import com.jakewharton.rxbinding2.view.clicks
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.extensions.dpToPx import common.util.extensions.dpToPx
import com.moez.QKSMS.common.util.extensions.setVisible import common.util.extensions.setVisible
import com.moez.QKSMS.presentation.common.base.QkActivity import presentation.common.base.QkActivity
import com.moez.QKSMS.presentation.common.widget.PreferenceView import presentation.common.widget.PreferenceView
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.PublishSubject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.settings package presentation.settings
data class SettingsState( data class SettingsState(
val selectingTheme: Boolean = false, val selectingTheme: Boolean = false,
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.settings package presentation.settings
import com.moez.QKSMS.presentation.common.base.QkView import presentation.common.base.QkView
import com.moez.QKSMS.presentation.common.widget.PreferenceView import presentation.common.widget.PreferenceView
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.presentation.settings package presentation.settings
import android.content.Context import android.content.Context
import com.moez.QKSMS.R import com.moez.QKSMS.R
import com.moez.QKSMS.common.di.appComponent import common.di.appComponent
import com.moez.QKSMS.common.util.Preferences import common.util.Preferences
import com.moez.QKSMS.domain.interactor.FullSync import interactor.FullSync
import com.moez.QKSMS.presentation.Navigator import presentation.Navigator
import com.moez.QKSMS.presentation.common.base.QkViewModel import presentation.common.base.QkViewModel
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject

Some files were not shown because too many files have changed in this diff Show More