diff --git a/app/src/main/java/app/pachli/MainActivity.kt b/app/src/main/java/app/pachli/MainActivity.kt index 07692a888..b087b396d 100644 --- a/app/src/main/java/app/pachli/MainActivity.kt +++ b/app/src/main/java/app/pachli/MainActivity.kt @@ -109,6 +109,7 @@ import app.pachli.core.network.model.Account import app.pachli.core.network.model.Notification import app.pachli.core.preferences.PrefKeys import app.pachli.core.ui.extensions.reduceSwipeSensitivity +import app.pachli.core.ui.makeIcon import app.pachli.databinding.ActivityMainBinding import app.pachli.db.DraftsAlert import app.pachli.interfaces.ActionButtonActivity @@ -117,7 +118,6 @@ import app.pachli.updatecheck.UpdateCheck import app.pachli.usecase.DeveloperToolsUseCase import app.pachli.usecase.LogoutUsecase import app.pachli.util.getDimension -import app.pachli.util.makeIcon import app.pachli.util.updateShortcut import at.connyduck.calladapter.networkresult.fold import com.bumptech.glide.Glide diff --git a/app/src/main/java/app/pachli/adapter/PollAdapter.kt b/app/src/main/java/app/pachli/adapter/PollAdapter.kt index b8dd2f7a8..3b9b5e520 100644 --- a/app/src/main/java/app/pachli/adapter/PollAdapter.kt +++ b/app/src/main/java/app/pachli/adapter/PollAdapter.kt @@ -23,8 +23,8 @@ import app.pachli.core.activity.emojify import app.pachli.core.common.extensions.visible import app.pachli.core.network.model.Emoji import app.pachli.core.ui.BindingHolder +import app.pachli.core.ui.makeIcon import app.pachli.databinding.ItemPollBinding -import app.pachli.util.makeIcon import app.pachli.viewdata.PollOptionViewData import app.pachli.viewdata.buildDescription import app.pachli.viewdata.calculatePercent diff --git a/app/src/main/java/app/pachli/adapter/StatusBaseViewHolder.kt b/app/src/main/java/app/pachli/adapter/StatusBaseViewHolder.kt index 90a674228..640b3eb90 100644 --- a/app/src/main/java/app/pachli/adapter/StatusBaseViewHolder.kt +++ b/app/src/main/java/app/pachli/adapter/StatusBaseViewHolder.kt @@ -37,6 +37,7 @@ import app.pachli.core.network.model.Emoji import app.pachli.core.network.model.PreviewCardKind import app.pachli.core.network.model.Status import app.pachli.core.preferences.CardViewMode +import app.pachli.core.ui.makeIcon import app.pachli.core.ui.setClickableMentions import app.pachli.core.ui.setClickableText import app.pachli.interfaces.StatusActionListener @@ -47,7 +48,6 @@ import app.pachli.util.expandTouchSizeToFillRow import app.pachli.util.getFormattedDescription import app.pachli.util.getRelativeTimeSpanString import app.pachli.util.iconResource -import app.pachli.util.makeIcon import app.pachli.view.MediaPreviewImageView import app.pachli.view.MediaPreviewLayout import app.pachli.view.PollView diff --git a/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt b/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt index 005390b49..9584e6574 100644 --- a/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt +++ b/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt @@ -94,6 +94,7 @@ import app.pachli.core.preferences.AppTheme import app.pachli.core.preferences.PrefKeys import app.pachli.core.preferences.SharedPreferencesRepository import app.pachli.core.ui.extensions.getErrorString +import app.pachli.core.ui.makeIcon import app.pachli.databinding.ActivityComposeBinding import app.pachli.util.PickMediaFiles import app.pachli.util.getInitialLanguages @@ -101,7 +102,6 @@ import app.pachli.util.getLocaleList import app.pachli.util.getMediaSize import app.pachli.util.highlightSpans import app.pachli.util.iconRes -import app.pachli.util.makeIcon import app.pachli.util.modernLanguageCode import app.pachli.util.setDrawableTint import com.canhub.cropper.CropImage diff --git a/app/src/main/java/app/pachli/components/notifications/NotificationsFragment.kt b/app/src/main/java/app/pachli/components/notifications/NotificationsFragment.kt index 7e9488023..7c4f2cf3e 100644 --- a/app/src/main/java/app/pachli/components/notifications/NotificationsFragment.kt +++ b/app/src/main/java/app/pachli/components/notifications/NotificationsFragment.kt @@ -61,6 +61,7 @@ import app.pachli.core.network.model.Status import app.pachli.core.ui.ActionButtonScrollListener import app.pachli.core.ui.BackgroundMessage import app.pachli.core.ui.extensions.getErrorString +import app.pachli.core.ui.makeIcon import app.pachli.databinding.FragmentTimelineNotificationsBinding import app.pachli.fragment.SFragment import app.pachli.interfaces.AccountActionListener @@ -69,7 +70,6 @@ import app.pachli.interfaces.StatusActionListener import app.pachli.util.ListStatusAccessibilityDelegate import app.pachli.util.UserRefreshState import app.pachli.util.asRefreshState -import app.pachli.util.makeIcon import app.pachli.viewdata.NotificationViewData import at.connyduck.sparkbutton.helpers.Utils import com.google.android.material.color.MaterialColors diff --git a/app/src/main/java/app/pachli/components/preference/AccountPreferencesFragment.kt b/app/src/main/java/app/pachli/components/preference/AccountPreferencesFragment.kt index 0d1802acc..f71520a17 100644 --- a/app/src/main/java/app/pachli/components/preference/AccountPreferencesFragment.kt +++ b/app/src/main/java/app/pachli/components/preference/AccountPreferencesFragment.kt @@ -47,6 +47,7 @@ import app.pachli.core.network.model.Account import app.pachli.core.network.model.Status import app.pachli.core.network.retrofit.MastodonApi import app.pachli.core.preferences.PrefKeys +import app.pachli.core.ui.makeIcon import app.pachli.settings.listPreference import app.pachli.settings.makePreferenceScreen import app.pachli.settings.preference @@ -56,7 +57,6 @@ import app.pachli.util.getInitialLanguages import app.pachli.util.getLocaleList import app.pachli.util.getPachliDisplayName import app.pachli.util.iconRes -import app.pachli.util.makeIcon import com.github.michaelbull.result.getOrElse import com.google.android.material.snackbar.Snackbar import com.mikepenz.iconics.IconicsDrawable diff --git a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt index 6e3b06527..b4bbb8bb6 100644 --- a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt +++ b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt @@ -35,6 +35,7 @@ import app.pachli.core.preferences.AppTheme import app.pachli.core.preferences.AppTheme.Companion.APP_THEME_DEFAULT import app.pachli.core.preferences.PrefKeys import app.pachli.core.preferences.SharedPreferencesRepository +import app.pachli.core.ui.makeIcon import app.pachli.settings.emojiPreference import app.pachli.settings.listPreference import app.pachli.settings.makePreferenceScreen @@ -47,7 +48,6 @@ import app.pachli.updatecheck.UpdateCheckResult.AT_LATEST import app.pachli.updatecheck.UpdateNotificationFrequency import app.pachli.util.LocaleManager import app.pachli.util.deserialize -import app.pachli.util.makeIcon import app.pachli.util.serialize import app.pachli.view.FontFamilyDialogFragment import com.mikepenz.iconics.IconicsDrawable diff --git a/app/src/main/java/app/pachli/util/IconUtils.kt b/core/ui/src/main/kotlin/app/pachli/core/ui/IconUtils.kt similarity index 98% rename from app/src/main/java/app/pachli/util/IconUtils.kt rename to core/ui/src/main/kotlin/app/pachli/core/ui/IconUtils.kt index ebd09e1b6..d4027a4c1 100644 --- a/app/src/main/java/app/pachli/util/IconUtils.kt +++ b/core/ui/src/main/kotlin/app/pachli/core/ui/IconUtils.kt @@ -14,7 +14,7 @@ * see . */ -package app.pachli.util +package app.pachli.core.ui import android.content.Context import android.graphics.Color