From 30b359c944dabf7203630c3d3eae7a7dcea05204 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 28 Dec 2018 23:11:31 -0500 Subject: Apply spotless --- .../com/pitchedapps/frost/activities/MainActivity.kt | 1 - .../pitchedapps/frost/contracts/ActivityContract.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/rx/Flyweight.kt | 18 +++++++++++++++++- .../main/kotlin/com/pitchedapps/frost/utils/Const.kt | 2 +- .../kotlin/com/pitchedapps/frost/utils/KotlinUtils.kt | 18 +++++++++++++++++- .../main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 3 +-- .../kotlin/com/pitchedapps/frost/rx/FlyweightTest.kt | 18 +++++++++++++++++- .../com/pitchedapps/frost/utils/CoroutineTest.kt | 19 +++++++++++++++++-- 8 files changed, 71 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt index e5eb1907..90f38e9e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt @@ -22,7 +22,6 @@ import com.google.android.material.tabs.TabLayout import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.views.BadgedIcon -import io.reactivex.subjects.PublishSubject import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.BroadcastChannel diff --git a/app/src/main/kotlin/com/pitchedapps/frost/contracts/ActivityContract.kt b/app/src/main/kotlin/com/pitchedapps/frost/contracts/ActivityContract.kt index 483e49c5..17753ce6 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/contracts/ActivityContract.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/contracts/ActivityContract.kt @@ -29,7 +29,7 @@ interface ActivityContract : FileChooserActivityContract interface MainActivityContract : ActivityContract, MainFabContract { val fragmentChannel: BroadcastChannel - val headerBadgeChannel : Channel + val headerBadgeChannel: Channel fun setTitle(res: Int) fun setTitle(text: CharSequence) /** diff --git a/app/src/main/kotlin/com/pitchedapps/frost/rx/Flyweight.kt b/app/src/main/kotlin/com/pitchedapps/frost/rx/Flyweight.kt index a9aedb6d..8bba4c3c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/rx/Flyweight.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/rx/Flyweight.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2018 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 . + */ package com.pitchedapps.frost.rx import kotlinx.coroutines.CancellationException @@ -135,4 +151,4 @@ class Flyweight( conditionMap.clear() resultMap.clear() } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt index 3d69b0ae..c878b6fb 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Const.kt @@ -32,4 +32,4 @@ const val REQUEST_TEXT_ZOOM = 1 shl 8 const val REQUEST_NAV = 1 shl 9 const val REQUEST_SEARCH = 1 shl 10 -const val MAIN_TIMEOUT_DURATION = 30 * 60 * 1000 // 30 min \ No newline at end of file +const val MAIN_TIMEOUT_DURATION = 30 * 60 * 1000 // 30 min diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/KotlinUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/KotlinUtils.kt index 320aeb69..f4357c9b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/KotlinUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/KotlinUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2018 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 . + */ package com.pitchedapps.frost.utils import kotlinx.coroutines.CoroutineScope @@ -17,4 +33,4 @@ fun ReceiveChannel.uniqueOnly(scope: CoroutineScope): ReceiveChannel = send(current) } } -} \ No newline at end of file +} 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 8e4e410d..d2e6ea96 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -117,8 +117,7 @@ private inline fun Context.launchWebOverlay if (argUrl.isFacebookUrl && argUrl.contains("/logout.php")) { L.d { "Logout php found" } FbCookie.logout(this) - } - else if (!(Prefs.linksInDefaultApp && resolveActivityForUri(Uri.parse(argUrl)))) + } else if (!(Prefs.linksInDefaultApp && resolveActivityForUri(Uri.parse(argUrl)))) startActivity(false, intentBuilder = { putExtra(ARG_URL, argUrl) }) diff --git a/app/src/test/kotlin/com/pitchedapps/frost/rx/FlyweightTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/rx/FlyweightTest.kt index 834163bd..b58878cb 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/rx/FlyweightTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/rx/FlyweightTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2018 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 . + */ package com.pitchedapps.frost.rx import kotlinx.coroutines.GlobalScope @@ -105,4 +121,4 @@ class FlyweightTest { println("Done") } } -} \ No newline at end of file +} diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt index f930e529..72eb6076 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2018 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 . + */ package com.pitchedapps.frost.utils import kotlinx.coroutines.Dispatchers @@ -188,7 +204,6 @@ class CoroutineTest { uniqueData, "Unique receiver should not have two consecutive events that are equal" ) - } } -} \ No newline at end of file +} -- cgit v1.2.3