refactor: Suppress lint errors for unused log TAG variables

This commit is contained in:
Nik Clayton 2023-09-19 22:38:54 +02:00
parent 986ccd0532
commit c335fa6217
9 changed files with 11 additions and 6 deletions

View File

@ -197,6 +197,8 @@ class AccountMediaFragment :
} }
companion object { companion object {
@Suppress("unused")
private const val TAG = "AccountMediaFragment"
fun newInstance(accountId: String): AccountMediaFragment { fun newInstance(accountId: String): AccountMediaFragment {
val fragment = AccountMediaFragment() val fragment = AccountMediaFragment()
@ -207,6 +209,5 @@ class AccountMediaFragment :
} }
private const val ACCOUNT_ID_ARG = "account_id" private const val ACCOUNT_ID_ARG = "account_id"
private const val TAG = "AccountMediaFragment"
} }
} }

View File

@ -1339,7 +1339,8 @@ class ComposeActivity :
) : Parcelable ) : Parcelable
companion object { companion object {
private const val TAG = "ComposeActivity" // logging tag @Suppress("unused")
private const val TAG = "ComposeActivity"
private const val PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 1 private const val PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 1
internal const val COMPOSE_OPTIONS_EXTRA = "COMPOSE_OPTIONS" internal const val COMPOSE_OPTIONS_EXTRA = "COMPOSE_OPTIONS"

View File

@ -17,7 +17,6 @@
package app.pachli.components.notifications package app.pachli.components.notifications
import android.annotation.SuppressLint
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.paging.PagingDataAdapter import androidx.paging.PagingDataAdapter
@ -226,7 +225,7 @@ class NotificationsPagingAdapter(
} }
companion object { companion object {
@SuppressLint("unused") @Suppress("unused")
private const val TAG = "NotificationsPagingAdapter" private const val TAG = "NotificationsPagingAdapter"
} }
} }

View File

@ -58,6 +58,7 @@ class FiltersRepository @Inject constructor(
) )
companion object { companion object {
@Suppress("unused")
private const val TAG = "FiltersRepository" private const val TAG = "FiltersRepository"
} }
} }

View File

@ -30,6 +30,7 @@ import com.google.gson.Gson
import com.google.gson.reflect.TypeToken import com.google.gson.reflect.TypeToken
import java.util.Date import java.util.Date
@Suppress("unused")
private const val TAG = "TimelineTypeMappers" private const val TAG = "TimelineTypeMappers"
private val attachmentArrayListType = object : TypeToken<ArrayList<Attachment>>() {}.type private val attachmentArrayListType = object : TypeToken<ArrayList<Attachment>>() {}.type

View File

@ -17,7 +17,6 @@
package app.pachli.components.trending.viewmodel package app.pachli.components.trending.viewmodel
import android.annotation.SuppressLint
import android.content.SharedPreferences import android.content.SharedPreferences
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
@ -103,7 +102,7 @@ class TrendingLinksViewModel @Inject constructor(
} }
companion object { companion object {
@SuppressLint("unused") @Suppress("unused")
private const val TAG = "TrendingLinksViewModel" private const val TAG = "TrendingLinksViewModel"
private val THROTTLE_TIMEOUT = 500.milliseconds private val THROTTLE_TIMEOUT = 500.milliseconds
} }

View File

@ -66,6 +66,7 @@ class ThreadAdapter(
} }
companion object { companion object {
@Suppress("unused")
private const val TAG = "ThreadAdapter" private const val TAG = "ThreadAdapter"
private const val VIEW_TYPE_STATUS = 0 private const val VIEW_TYPE_STATUS = 0
private const val VIEW_TYPE_STATUS_DETAILED = 1 private const val VIEW_TYPE_STATUS_DETAILED = 1

View File

@ -491,6 +491,7 @@ abstract class SFragment : Fragment(), Injectable {
} }
companion object { companion object {
@Suppress("unused")
private const val TAG = "SFragment" private const val TAG = "SFragment"
private fun accountIsInMentions(account: AccountEntity?, mentions: List<Status.Mention>): Boolean { private fun accountIsInMentions(account: AccountEntity?, mentions: List<Status.Mention>): Boolean {
return mentions.any { mention -> return mentions.any { mention ->

View File

@ -195,6 +195,7 @@ class SliderPreference @JvmOverloads constructor(
} }
companion object { companion object {
@Suppress("unused")
private const val TAG = "SliderPreference" private const val TAG = "SliderPreference"
private const val defaultValueFrom = 0F private const val defaultValueFrom = 0F
private const val defaultValueTo = 1F private const val defaultValueTo = 1F