From 656b699ce95b54afc051c84616aac73ab295841c Mon Sep 17 00:00:00 2001 From: dece Date: Mon, 10 Jan 2022 16:35:15 +0100 Subject: [PATCH] clean and make a bunch of static variables private --- .../lowrespalmtree/comet/ContentAdapter.kt | 20 +++++++++---------- .../java/dev/lowrespalmtree/comet/Gemtext.kt | 2 +- .../dev/lowrespalmtree/comet/PageViewModel.kt | 2 +- .../lowrespalmtree/comet/SettingsFragment.kt | 2 -- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/dev/lowrespalmtree/comet/ContentAdapter.kt b/app/src/main/java/dev/lowrespalmtree/comet/ContentAdapter.kt index 3f630b6..062b43f 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/ContentAdapter.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/ContentAdapter.kt @@ -161,15 +161,15 @@ class ContentAdapter(private val listener: ContentAdapterListener) : override fun getItemCount(): Int = blocks.size companion object { - const val TAG = "ContentRecycler" - const val TYPE_EMPTY = 0 - const val TYPE_TITLE_1 = 1 - const val TYPE_TITLE_2 = 2 - const val TYPE_TITLE_3 = 3 - const val TYPE_PARAGRAPH = 4 - const val TYPE_LINK = 5 - const val TYPE_PREFORMATTED = 6 - const val TYPE_BLOCKQUOTE = 7 - const val TYPE_LIST_ITEM = 8 + private const val TAG = "ContentRecycler" + private const val TYPE_EMPTY = 0 + private const val TYPE_TITLE_1 = 1 + private const val TYPE_TITLE_2 = 2 + private const val TYPE_TITLE_3 = 3 + private const val TYPE_PARAGRAPH = 4 + private const val TYPE_LINK = 5 + private const val TYPE_PREFORMATTED = 6 + private const val TYPE_BLOCKQUOTE = 7 + private const val TYPE_LIST_ITEM = 8 } } \ No newline at end of file diff --git a/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt b/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt index fb11c0b..5426541 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt @@ -19,7 +19,7 @@ class PreTextLine(val text: String) : Line class BlockquoteLine(val text: String) : Line class ListItemLine(val text: String) : Line -const val TAG = "Gemtext" +private const val TAG = "Gemtext" /** Pipe incoming gemtext data into parsed Lines. */ fun parseData( diff --git a/app/src/main/java/dev/lowrespalmtree/comet/PageViewModel.kt b/app/src/main/java/dev/lowrespalmtree/comet/PageViewModel.kt index 441bdef..17f1a41 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/PageViewModel.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/PageViewModel.kt @@ -184,6 +184,6 @@ class PageViewModel : ViewModel() { } companion object { - const val TAG = "PageViewModel" + private const val TAG = "PageViewModel" } } \ No newline at end of file diff --git a/app/src/main/java/dev/lowrespalmtree/comet/SettingsFragment.kt b/app/src/main/java/dev/lowrespalmtree/comet/SettingsFragment.kt index e5882d8..45f9078 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/SettingsFragment.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/SettingsFragment.kt @@ -1,12 +1,10 @@ package dev.lowrespalmtree.comet import android.os.Bundle -import android.util.Log import androidx.lifecycle.lifecycleScope import androidx.preference.EditTextPreference import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat -import androidx.preference.SeekBarPreference import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch