diff options
author | Allan Wang <me@allanwang.ca> | 2020-02-23 16:53:50 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-02-23 16:53:50 -0800 |
commit | b4bc704c3e7c818a709db38e19292aead339f810 (patch) | |
tree | 5e48d0ac82e17e97b44a43614c33d62fcab7d686 | |
parent | 62fb124f5dcfad66e700e9f27161d41bb0e0aa3c (diff) | |
download | frost-b4bc704c3e7c818a709db38e19292aead339f810.tar.gz frost-b4bc704c3e7c818a709db38e19292aead339f810.tar.bz2 frost-b4bc704c3e7c818a709db38e19292aead339f810.zip |
Apply spotless
15 files changed, 27 insertions, 21 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt index 528ff2a4..2931a30c 100644 --- a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2020 Allan Wang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package com.pitchedapps.frost import android.app.Application @@ -39,4 +55,4 @@ class FrostTestApp : Application() { } } } -}
\ No newline at end of file +} diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index e8cc2b35..34808e65 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -35,6 +35,7 @@ import com.pitchedapps.frost.utils.FrostPglAdBlock import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.Showcase +import java.util.Random import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidLogger import org.koin.core.KoinComponent @@ -42,7 +43,6 @@ import org.koin.core.context.startKoin import org.koin.core.get import org.koin.core.module.Module import org.koin.dsl.module -import java.util.Random /** * Created by Allan Wang on 2017-05-28. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt index aa87483f..4bcf4aca 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt @@ -43,9 +43,9 @@ import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.loadAssets +import java.util.ArrayList import kotlinx.coroutines.launch import org.koin.android.ext.android.inject -import java.util.ArrayList /** * Created by Allan Wang on 2017-05-28. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index ab6f41ca..2cd01988 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -93,7 +93,6 @@ import com.pitchedapps.frost.db.GenericDao import com.pitchedapps.frost.db.currentCookie import com.pitchedapps.frost.db.getTabs import com.pitchedapps.frost.enums.MainActivityLayout -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.parsers.FrostSearch import com.pitchedapps.frost.facebook.parsers.SearchParser diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt index 23a247ad..ffb1f1ef 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt @@ -36,7 +36,6 @@ import com.pitchedapps.frost.db.CookieDao import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.db.save import com.pitchedapps.frost.db.selectAll -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.profilePictureUrl import com.pitchedapps.frost.glide.FrostGlide diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt index 357c159d..33215c7e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt @@ -27,7 +27,6 @@ import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.adapters.FastItemAdapter import com.mikepenz.fastadapter.listeners.ClickEventHook import com.pitchedapps.frost.R -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.utils.cookies import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.setFrostColors diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index 2b321d9e..6db3690a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -56,7 +56,6 @@ import com.pitchedapps.frost.contracts.FrostContentContainer import com.pitchedapps.frost.contracts.VideoViewHolder import com.pitchedapps.frost.enums.OverlayContext import com.pitchedapps.frost.facebook.FB_URL_BASE -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.USER_AGENT import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP_CONST 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 aa12fbc5..23f67b3e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt @@ -28,13 +28,13 @@ import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.cookies import com.pitchedapps.frost.utils.launchLogin +import kotlin.coroutines.resume +import kotlin.coroutines.suspendCoroutine import kotlinx.coroutines.NonCancellable import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.withContext import org.koin.dsl.module -import kotlin.coroutines.resume -import kotlin.coroutines.suspendCoroutine /** * Created by Allan Wang on 2017-05-30. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt index 22d2aa8c..51beab93 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt @@ -23,7 +23,6 @@ import com.mikepenz.fastadapter.GenericItem import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.fastadapter.adapters.ModelAdapter import com.pitchedapps.frost.R -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.parsers.FrostParser import com.pitchedapps.frost.facebook.parsers.ParseData import com.pitchedapps.frost.facebook.parsers.ParseResponse 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 b10136db..4c01f5e0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt @@ -37,8 +37,8 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.IntroActivity import com.pitchedapps.frost.databinding.IntroAnalyticsBinding import com.pitchedapps.frost.utils.Prefs -import org.koin.android.ext.android.inject import kotlin.math.abs +import org.koin.android.ext.android.inject /** * Created by Allan Wang on 2017-07-28. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt index 6c2f4e86..9a4751b8 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt @@ -32,7 +32,6 @@ import com.pitchedapps.frost.activities.SettingsActivity import com.pitchedapps.frost.activities.SettingsActivity.Companion.ACTIVITY_REQUEST_DEBUG import com.pitchedapps.frost.debugger.OfflineWebsite import com.pitchedapps.frost.facebook.FB_URL_BASE -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.parsers.FrostParser import com.pitchedapps.frost.facebook.parsers.MessageParser import com.pitchedapps.frost.facebook.parsers.NotifParser 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 46c87c96..ae178c48 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt @@ -71,9 +71,9 @@ enum class WebContextType( OPEN_LINK( R.string.open_link, { it.hasUrl }, - { c, wc , fc -> c.launchWebOverlay(wc.url!!, fc) }), - COPY_LINK(R.string.copy_link, { it.hasUrl }, { c, wc , fc-> c.copyToClipboard(wc.url) }), - COPY_TEXT(R.string.copy_text, { it.hasText }, { c, wc , fc-> c.copyToClipboard(wc.text) }), + { c, wc, fc -> c.launchWebOverlay(wc.url!!, fc) }), + COPY_LINK(R.string.copy_link, { it.hasUrl }, { c, wc, fc -> c.copyToClipboard(wc.url) }), + COPY_TEXT(R.string.copy_text, { it.hasText }, { c, wc, fc -> c.copyToClipboard(wc.text) }), SHARE_LINK(R.string.share_link, { it.hasUrl }, { c, wc, fc -> c.shareText(wc.url) }), DEBUG_LINK(R.string.debug_link, { it.hasUrl }, { c, wc, fc -> c.materialDialog { 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 b02612e3..dd31d303 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt @@ -42,11 +42,11 @@ import com.pitchedapps.frost.web.FrostChromeClient import com.pitchedapps.frost.web.FrostJSI import com.pitchedapps.frost.web.FrostWebViewClient import com.pitchedapps.frost.web.NestedWebView -import org.koin.core.KoinComponent -import org.koin.core.inject import kotlin.math.abs import kotlin.math.max import kotlin.math.min +import org.koin.core.KoinComponent +import org.koin.core.inject /** * Created by Allan Wang on 2017-05-29. 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 9fe4c4c9..05248153 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -35,9 +35,6 @@ import com.pitchedapps.frost.utils.showWebContextMenu import com.pitchedapps.frost.views.FrostWebView import kotlinx.coroutines.channels.SendChannel import kotlinx.coroutines.launch -import org.koin.android.ext.android.inject -import org.koin.core.KoinComponent -import org.koin.core.inject /** * Created by Allan Wang on 2017-06-01. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt index c54f9822..b4dd93da 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt @@ -20,7 +20,6 @@ import ca.allanwang.kau.utils.runOnUiThread import com.pitchedapps.frost.activities.WebOverlayActivity import com.pitchedapps.frost.activities.WebOverlayActivityBase import com.pitchedapps.frost.contracts.VideoViewHolder -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP_CONST import com.pitchedapps.frost.facebook.formattedFbUrl |