From b1c7358c24ab95825d18293636251f276637ba25 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 7 Mar 2019 19:43:26 -0500 Subject: Apply spotless --- .../main/kotlin/com/pitchedapps/frost/db/CacheDb.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/db/Database.kt | 18 ++++++++++++++++-- .../main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/db/GenericDb.kt | 2 +- .../kotlin/com/pitchedapps/frost/db/NotificationDb.kt | 2 +- 6 files changed, 21 insertions(+), 7 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/db') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt index 8c3c9c6b..4906f60a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt @@ -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 - } \ No newline at end of file + } 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 7e929370..5aadbb02 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt @@ -82,4 +82,4 @@ data class CookieModel(@PrimaryKey var id: Long = -1L, var name: String? = null, BaseModel(), Parcelable { override fun toString(): String = "CookieModel(${hashCode()})" -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt index 0c009634..e1b1d4c4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt @@ -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 . + */ 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 diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt index c63be794..a704ce82 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt @@ -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() \ No newline at end of file +data class FbTabModel(@PrimaryKey var position: Int = -1, var tab: FbItem = FbItem.FEED) : BaseModel() diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt index c1f05092..4177ae86 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt @@ -68,4 +68,4 @@ suspend fun GenericDao.getTabs(): List { ?.mapNotNull { allTabs[it] } ?.takeIf { it.isNotEmpty() } ?: defaultTabs() -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt index 01baa43e..afeeefcd 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt @@ -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) \ No newline at end of file + ?: NotificationModel(id = id) -- cgit v1.2.3