diff options
author | Allan Wang <me@allanwang.ca> | 2020-07-18 19:22:02 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-07-18 19:22:02 -0700 |
commit | 0fc1e0c9c13c6cf551f985c3617f1bcaf8f62aa6 (patch) | |
tree | 2108dbc732579b58458ca7e63010daaf6fff435e /app | |
parent | 1b26bce26cc675d23e500eee4edbc675a818fc61 (diff) | |
download | frost-0fc1e0c9c13c6cf551f985c3617f1bcaf8f62aa6.tar.gz frost-0fc1e0c9c13c6cf551f985c3617f1bcaf8f62aa6.tar.bz2 frost-0fc1e0c9c13c6cf551f985c3617f1bcaf8f62aa6.zip |
Create prefs package
Diffstat (limited to 'app')
47 files changed, 47 insertions, 44 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt index 607adbf1..e8007a62 100644 --- a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt @@ -23,7 +23,7 @@ import ca.allanwang.kau.kpref.KPrefFactory import ca.allanwang.kau.kpref.KPrefFactoryInMemory import com.pitchedapps.frost.db.FrostDatabase import com.pitchedapps.frost.facebook.FbCookie -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.Showcase import org.junit.rules.TestRule import org.junit.runner.Description diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 247011ac..4640735b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -33,7 +33,7 @@ import com.pitchedapps.frost.services.setupNotificationChannels import com.pitchedapps.frost.utils.BuildUtils import com.pitchedapps.frost.utils.FrostPglAdBlock import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.Showcase import java.util.Random import org.koin.android.ext.koin.androidContext diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt index 40fe422e..e690f3ca 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt @@ -40,7 +40,7 @@ import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.utils.BiometricUtils import com.pitchedapps.frost.utils.EXTRA_COOKIES import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.loadAssets import java.util.ArrayList diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt index af5ba755..685002d5 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt @@ -48,7 +48,7 @@ import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.R import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.android.ext.android.inject /** diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt index f41f19e5..d2ba0a92 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt @@ -22,7 +22,7 @@ import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.searchview.SearchViewHolder import com.pitchedapps.frost.contracts.VideoViewHolder import com.pitchedapps.frost.facebook.FbCookie -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.setFrostTheme import org.koin.android.ext.android.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt index 03980a21..4554432b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt @@ -31,7 +31,7 @@ import com.pitchedapps.frost.databinding.ActivityDebugBinding import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.injectors.JsActions import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.createFreshDir import com.pitchedapps.frost.utils.setFrostColors import java.io.File diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt index 4dad1606..4c75730d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt @@ -59,7 +59,7 @@ import com.pitchedapps.frost.services.LocalService import com.pitchedapps.frost.utils.ARG_COOKIE import com.pitchedapps.frost.utils.ARG_IMAGE_URL import com.pitchedapps.frost.utils.ARG_TEXT -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.frostDownload import com.pitchedapps.frost.utils.frostSnackbar import com.pitchedapps.frost.utils.frostUriFromFile diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt index 232fc56d..efb9956c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt @@ -47,7 +47,7 @@ import com.pitchedapps.frost.intro.IntroFragmentTheme import com.pitchedapps.frost.intro.IntroFragmentWelcome import com.pitchedapps.frost.intro.IntroTabContextFragment import com.pitchedapps.frost.intro.IntroTabTouchFragment -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.cookies import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.loadAssets diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index 67f605be..cec8d494 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -52,7 +52,7 @@ import com.pitchedapps.frost.settings.getNotificationPrefs import com.pitchedapps.frost.settings.getSecurityPrefs import com.pitchedapps.frost.settings.sendDebug import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.REQUEST_REFRESH import com.pitchedapps.frost.utils.REQUEST_RESTART import com.pitchedapps.frost.utils.cookies diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt index 68e7e3de..388edfe6 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt @@ -23,7 +23,7 @@ import androidx.room.Entity import androidx.room.Insert import androidx.room.OnConflictStrategy import androidx.room.Query -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import kotlinx.android.parcel.Parcelize /** diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt index 4f6d6a29..79a6f188 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt @@ -17,7 +17,7 @@ package com.pitchedapps.frost.enums import com.pitchedapps.frost.R -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs /** * Created by Allan Wang on 2017-08-19. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt index 23fa2ebf..d682ad3b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt @@ -22,7 +22,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.injectors.CssAssets import com.pitchedapps.frost.injectors.InjectorContract import com.pitchedapps.frost.injectors.JsActions -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs /** * Created by Allan Wang on 2017-06-14. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt index 23f67b3e..6356ff75 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt @@ -25,7 +25,7 @@ import com.pitchedapps.frost.db.deleteById import com.pitchedapps.frost.db.save import com.pitchedapps.frost.db.selectById import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.cookies import com.pitchedapps.frost.utils.launchLogin import kotlin.coroutines.resume diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt index 257611e8..5ad459f8 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt @@ -36,7 +36,7 @@ import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.utils.ARG_URL import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.REQUEST_REFRESH import com.pitchedapps.frost.utils.REQUEST_TEXT_ZOOM import com.pitchedapps.frost.utils.frostEvent diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt index 746f0c1c..d8d30aef 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt @@ -28,7 +28,7 @@ import com.mikepenz.fastadapter.IAdapter import com.mikepenz.fastadapter.select.selectExtension import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbCookie -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.launchWebOverlay import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt index ab8e7afd..b13102f7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt @@ -36,7 +36,7 @@ import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.parsers.FrostNotif import com.pitchedapps.frost.glide.FrostGlide import com.pitchedapps.frost.glide.GlideApp -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.isIndependent import com.pitchedapps.frost.utils.launchWebOverlay import org.koin.core.KoinComponent diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt index fcd71031..e519aee4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt @@ -29,7 +29,7 @@ import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.drag.IDraggable import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbItem -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt index b485c04c..4b93bb3a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt @@ -27,7 +27,7 @@ import ca.allanwang.kau.utils.toRgbaString import ca.allanwang.kau.utils.use import ca.allanwang.kau.utils.withAlpha import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import java.io.BufferedReader import java.io.FileNotFoundException import java.util.Locale diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt index 9630117d..558017fd 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt @@ -17,7 +17,7 @@ package com.pitchedapps.frost.injectors import android.webkit.WebView -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs /** * Created by Allan Wang on 2017-05-31. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssSmallAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssSmallAssets.kt index 27b6e278..30ee7a8f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssSmallAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssSmallAssets.kt @@ -17,7 +17,7 @@ package com.pitchedapps.frost.injectors import android.webkit.WebView -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs /** * Small misc inline css assets diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt index 72138f5b..816bb3d6 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt @@ -18,7 +18,7 @@ package com.pitchedapps.frost.injectors import android.webkit.WebView import com.pitchedapps.frost.facebook.FB_URL_BASE -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs /** * Created by Allan Wang on 2017-05-31. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt index e2d60f31..fbd10b18 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt @@ -21,7 +21,7 @@ import android.webkit.WebView import androidx.annotation.VisibleForTesting import ca.allanwang.kau.kotlin.lazyContext import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import java.io.BufferedReader import java.io.FileNotFoundException import java.util.Locale diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt index b801a871..73a62f17 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt @@ -19,7 +19,7 @@ package com.pitchedapps.frost.injectors import android.webkit.WebView import androidx.annotation.VisibleForTesting import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.web.FrostWebViewClient import kotlin.random.Random import org.apache.commons.text.StringEscapeUtils diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt index 4c01f5e0..3bf98678 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt @@ -36,7 +36,7 @@ import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.IntroActivity import com.pitchedapps.frost.databinding.IntroAnalyticsBinding -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import kotlin.math.abs import org.koin.android.ext.android.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt index bfd0d2c0..a745c9b2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -package com.pitchedapps.frost.utils +package com.pitchedapps.frost.prefs import android.graphics.Color import ca.allanwang.kau.kotlin.lazyResettable diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt index c4f71452..92cce44b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt @@ -46,7 +46,7 @@ import com.pitchedapps.frost.glide.GlideApp import com.pitchedapps.frost.settings.hasNotifications import com.pitchedapps.frost.utils.ARG_USER_ID import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.frostEvent import com.pitchedapps.frost.utils.isIndependent import java.util.Locale diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt index 4c80f63d..98a8db96 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt @@ -26,7 +26,7 @@ import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.db.NotificationDao import com.pitchedapps.frost.db.selectAll import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.frostEvent import com.pitchedapps.frost.widgets.NotificationWidget import kotlinx.coroutines.Dispatchers diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt index 60cf874f..d9a77c2b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt @@ -32,7 +32,7 @@ import ca.allanwang.kau.utils.color import ca.allanwang.kau.utils.string import com.pitchedapps.frost.R import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.frostUri /** diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt index 4c419e52..24b0643f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt @@ -20,7 +20,7 @@ import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt index 3a2d7732..ed0c27b0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Notifications.kt @@ -34,7 +34,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.SettingsActivity import com.pitchedapps.frost.db.deleteAll import com.pitchedapps.frost.services.fetchNotifications -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.REQUEST_NOTIFICATION import com.pitchedapps.frost.utils.frostSnackbar import com.pitchedapps.frost.utils.frostUri diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt index 21be4168..80f83c8d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt @@ -26,6 +26,7 @@ import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent import ca.allanwang.kau.utils.string import com.pitchedapps.frost.R +import com.pitchedapps.frost.prefs.Prefs import java.util.concurrent.Executor import java.util.concurrent.ExecutorService import java.util.concurrent.Executors diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index 2368a992..b36ba83f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -69,6 +69,7 @@ import com.pitchedapps.frost.facebook.formattedFbUri import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.injectors.CssAssets import com.pitchedapps.frost.injectors.JsAssets +import com.pitchedapps.frost.prefs.Prefs import java.io.File import java.io.IOException import java.net.URLEncoder diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt index 2e5d2fce..3ab924e2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt @@ -27,6 +27,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.MainActivity import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.formattedFbUrl +import com.pitchedapps.frost.prefs.Prefs /** * Created by Allan Wang on 2017-07-07. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index aab7189c..b621da07 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -37,7 +37,7 @@ import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.facebook.profilePictureUrl import com.pitchedapps.frost.glide.FrostGlide import com.pitchedapps.frost.glide.GlideApp -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt index fb56d4dc..4b5b24c1 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt @@ -29,7 +29,7 @@ import ca.allanwang.kau.utils.visible import ca.allanwang.kau.utils.withAlpha import com.mikepenz.iconics.typeface.IIcon import com.pitchedapps.frost.databinding.ViewBadgedIconBinding -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt index 4fbf1482..a40d6e48 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt @@ -41,7 +41,7 @@ import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.WEB_LOAD_DELAY import com.pitchedapps.frost.kotlin.subscribeDuringJob import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.BroadcastChannel diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt index 6b156cc4..7bdfff0c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt @@ -27,7 +27,7 @@ import com.pitchedapps.frost.contracts.FrostContentContainer import com.pitchedapps.frost.contracts.FrostContentCore import com.pitchedapps.frost.contracts.FrostContentParent import com.pitchedapps.frost.fragments.RecyclerContentContract -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch import org.koin.core.KoinComponent diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 20480d10..c7c63d66 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -44,7 +44,7 @@ import com.pitchedapps.frost.databinding.ViewVideoBinding import com.pitchedapps.frost.db.CookieDao import com.pitchedapps.frost.db.currentCookie import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.ctxCoroutine import com.pitchedapps.frost.utils.frostDownload import org.koin.core.KoinComponent diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt index 819ec68a..41c3ad86 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt @@ -21,7 +21,7 @@ import android.content.Context import android.util.AttributeSet import android.view.MotionEvent import androidx.viewpager.widget.ViewPager -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt index d3c79272..abce17f4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt @@ -35,7 +35,7 @@ import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.USER_AGENT import com.pitchedapps.frost.fragments.WebFragment import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.ctxCoroutine import com.pitchedapps.frost.utils.frostDownload import com.pitchedapps.frost.web.FrostChromeClient diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt index e96e2060..b4ef2837 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt @@ -37,7 +37,7 @@ import com.mikepenz.fastadapter.listeners.ClickEventHook import com.mikepenz.iconics.typeface.IIcon import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt index 199e9cfb..6b905b52 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt @@ -29,7 +29,7 @@ import com.pitchedapps.frost.injectors.CssHider import com.pitchedapps.frost.injectors.CssSmallAssets import com.pitchedapps.frost.injectors.jsInject import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.createFreshFile import com.pitchedapps.frost.utils.isFacebookUrl import java.io.File diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index f7b15ed2..71427bf0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -25,7 +25,7 @@ import com.pitchedapps.frost.contracts.VideoViewHolder import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.WebContext import com.pitchedapps.frost.utils.cookies import com.pitchedapps.frost.utils.ctxCoroutine diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt index 9e0c64ab..32d58f00 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt @@ -34,7 +34,7 @@ import com.pitchedapps.frost.injectors.JsActions import com.pitchedapps.frost.injectors.JsAssets import com.pitchedapps.frost.injectors.jsInject import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.isExplicitIntent import com.pitchedapps.frost.utils.isFacebookUrl import com.pitchedapps.frost.utils.isImageUrl diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt index 37e06db9..fd0d864e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt @@ -38,7 +38,7 @@ import com.pitchedapps.frost.facebook.get import com.pitchedapps.frost.injectors.CssHider import com.pitchedapps.frost.injectors.jsInject import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.isFacebookUrl import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.coroutineScope diff --git a/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt b/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt index fc62ef44..5c959277 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt @@ -45,7 +45,7 @@ import com.pitchedapps.frost.glide.FrostGlide import com.pitchedapps.frost.glide.GlideApp import com.pitchedapps.frost.services.NotificationContent import com.pitchedapps.frost.services.NotificationType -import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.toReadableTime import org.koin.core.KoinComponent import org.koin.core.inject diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/prefs/PrefsTest.kt index d592f2b6..28c0c899 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/prefs/PrefsTest.kt @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -package com.pitchedapps.frost.utils +package com.pitchedapps.frost.prefs import kotlin.test.assertEquals import org.junit.Before |