mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 20:12:39 +01:00
Apply spotless
This commit is contained in:
parent
3f5d2cf2a5
commit
b1c7358c24
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import android.content.Context
|
||||
@ -29,4 +45,4 @@ abstract class BaseDbTest {
|
||||
fun after() {
|
||||
db.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import kotlinx.coroutines.runBlocking
|
||||
@ -29,4 +45,4 @@ class CacheDbTest : BaseDbTest() {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import kotlinx.coroutines.runBlocking
|
||||
@ -66,4 +82,4 @@ class CookieDbTest : BaseDbTest() {
|
||||
assertNull(dao.selectById(cookie.id + 1), "Inexistent cookie selection failed")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
@ -35,4 +51,4 @@ class DatabaseTest : KoinTest {
|
||||
val missingKoins = (members + FrostDatabase::class).filter { !hasKoin(it) }
|
||||
assertTrue(missingKoins.isEmpty(), "Missing koins: $missingKoins")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import com.pitchedapps.frost.facebook.FbItem
|
||||
@ -43,4 +59,4 @@ class GenericDbTest : BaseDbTest() {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import com.pitchedapps.frost.services.NOTIF_CHANNEL_GENERAL
|
||||
@ -125,4 +141,4 @@ class NotificationDbTest : BaseDbTest() {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ class TabCustomizerActivity : BaseActivity() {
|
||||
bindSwapper(adapter, tab_recycler)
|
||||
|
||||
adapter.withOnClickListener { view, _, _, _ -> view!!.wobble(); true }
|
||||
|
||||
}
|
||||
|
||||
setResult(Activity.RESULT_CANCELED)
|
||||
|
@ -74,4 +74,4 @@ suspend fun CacheDao.save(id: Long, type: String, contents: String): Boolean =
|
||||
} catch (e: Exception) {
|
||||
L.e(e) { "Cache save failed for $type" }
|
||||
false
|
||||
}
|
||||
}
|
||||
|
@ -82,4 +82,4 @@ data class CookieModel(@PrimaryKey var id: Long = -1L, var name: String? = null,
|
||||
BaseModel(), Parcelable {
|
||||
|
||||
override fun toString(): String = "CookieModel(${hashCode()})"
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,25 @@
|
||||
/*
|
||||
* Copyright 2019 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.db
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverters
|
||||
import org.koin.core.Koin
|
||||
import org.koin.dsl.module.module
|
||||
import org.koin.standalone.StandAloneContext
|
||||
|
||||
|
@ -35,4 +35,4 @@ object FbTabsDb {
|
||||
}
|
||||
|
||||
@Table(database = FbTabsDb::class, allFields = true)
|
||||
data class FbTabModel(@PrimaryKey var position: Int = -1, var tab: FbItem = FbItem.FEED) : BaseModel()
|
||||
data class FbTabModel(@PrimaryKey var position: Int = -1, var tab: FbItem = FbItem.FEED) : BaseModel()
|
||||
|
@ -68,4 +68,4 @@ suspend fun GenericDao.getTabs(): List<FbItem> {
|
||||
?.mapNotNull { allTabs[it] }
|
||||
?.takeIf { it.isNotEmpty() }
|
||||
?: defaultTabs()
|
||||
}
|
||||
}
|
||||
|
@ -194,4 +194,4 @@ data class NotificationModel(
|
||||
|
||||
private fun lastNotificationTime(id: Long): NotificationModel =
|
||||
(select from NotificationModel::class where (NotificationModel_Table.id eq id)).querySingle()
|
||||
?: NotificationModel(id = id)
|
||||
?: NotificationModel(id = id)
|
||||
|
@ -20,7 +20,6 @@ import android.util.Log
|
||||
import ca.allanwang.kau.logging.KauLogger
|
||||
import com.bugsnag.android.Bugsnag
|
||||
import com.pitchedapps.frost.BuildConfig
|
||||
import java.lang.Exception
|
||||
|
||||
/**
|
||||
* Created by Allan Wang on 2017-05-28.
|
||||
|
@ -104,7 +104,6 @@ class FrostVideoViewer @JvmOverloads constructor(
|
||||
val cookie = FrostDatabase.get().cookieDao().currentCookie() ?: return@launchMain
|
||||
context.frostDownload(cookie, video.videoUri)
|
||||
}
|
||||
|
||||
}
|
||||
true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user