From 5a35009e35457ed63dbf4a5592825d83e37f9426 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 23 Oct 2024 15:16:07 +0200 Subject: [PATCH] change: Remove unused code (#1044) --- .../pachli/core/activity/AccountSelectionAdapter.kt | 3 --- .../app/pachli/core/data/repository/AccountManager.kt | 11 ----------- .../kotlin/app/pachli/core/network/model/Status.kt | 1 - 3 files changed, 15 deletions(-) diff --git a/core/activity/src/main/kotlin/app/pachli/core/activity/AccountSelectionAdapter.kt b/core/activity/src/main/kotlin/app/pachli/core/activity/AccountSelectionAdapter.kt index 9afaeec69..753f449e8 100644 --- a/core/activity/src/main/kotlin/app/pachli/core/activity/AccountSelectionAdapter.kt +++ b/core/activity/src/main/kotlin/app/pachli/core/activity/AccountSelectionAdapter.kt @@ -22,7 +22,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ArrayAdapter -import androidx.preference.PreferenceManager import app.pachli.core.activity.databinding.ItemAutocompleteAccountBinding import app.pachli.core.database.model.AccountEntity import app.pachli.core.designsystem.R as DR @@ -42,8 +41,6 @@ class AccountSelectionAdapter( val account = getItem(position) if (account != null) { - val pm = PreferenceManager.getDefaultSharedPreferences(binding.avatar.context) - binding.username.text = account.fullName binding.displayName.text = account.displayName.emojify(account.emojis, binding.displayName, animateEmojis) binding.avatarBadge.visibility = View.GONE // We never want to display the bot badge here diff --git a/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt b/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt index 35e439de2..d300a7eaa 100644 --- a/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt +++ b/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt @@ -255,17 +255,6 @@ class AccountManager @Inject constructor( } } - /** - * Finds an account by its string identifier - * @param identifier the string identifier of the account - * @return the requested account or null if it was not found - */ - fun getAccountByIdentifier(identifier: String): AccountEntity? { - return accounts.find { - identifier == it.identifier - } - } - /** * @return true if the name of the currently-selected account should be displayed in UIs */ diff --git a/core/network/src/main/kotlin/app/pachli/core/network/model/Status.kt b/core/network/src/main/kotlin/app/pachli/core/network/model/Status.kt index 7d59070e7..a22e1d20d 100644 --- a/core/network/src/main/kotlin/app/pachli/core/network/model/Status.kt +++ b/core/network/src/main/kotlin/app/pachli/core/network/model/Status.kt @@ -17,7 +17,6 @@ package app.pachli.core.network.model -import android.app.Application import android.text.SpannableStringBuilder import android.text.style.URLSpan import app.pachli.core.common.extensions.getOrElse