From 48a2e76fd319767436a9f0881fc009724e93ce7a Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 8 Dec 2024 20:12:36 +0100 Subject: [PATCH] chore: remove unused imports --- .../com/bnyro/wallpaper/ui/activities/MainActivity.kt | 2 -- .../wallpaper/ui/components/WallpaperChangerPref.kt | 9 ++------- .../wallpaper/ui/components/WallpaperFilterEditor.kt | 6 +++--- .../com/bnyro/wallpaper/ui/components/WallpaperView.kt | 6 +++--- .../wallpaper/ui/components/dialogs/FilterDialog.kt | 1 - .../main/java/com/bnyro/wallpaper/ui/models/MainModel.kt | 1 - .../java/com/bnyro/wallpaper/ui/nav/DrawerScreens.kt | 8 -------- .../java/com/bnyro/wallpaper/ui/pages/HistoryPage.kt | 1 - .../java/com/bnyro/wallpaper/util/BackgroundWorker.kt | 2 +- .../main/java/com/bnyro/wallpaper/util/Preferences.kt | 2 -- 10 files changed, 9 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/activities/MainActivity.kt b/app/src/main/java/com/bnyro/wallpaper/ui/activities/MainActivity.kt index e9dac424..7bc0951d 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/activities/MainActivity.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/activities/MainActivity.kt @@ -18,7 +18,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.get @@ -29,7 +28,6 @@ import com.bnyro.wallpaper.ui.models.MainModel import com.bnyro.wallpaper.ui.nav.AppNavHost import com.bnyro.wallpaper.ui.nav.DrawerScreens import com.bnyro.wallpaper.ui.theme.WallYouTheme -import com.bnyro.wallpaper.util.Either import com.bnyro.wallpaper.util.Preferences import com.bnyro.wallpaper.util.str import kotlinx.coroutines.launch diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperChangerPref.kt b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperChangerPref.kt index c1695d30..1167d9cf 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperChangerPref.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperChangerPref.kt @@ -1,10 +1,8 @@ package com.bnyro.wallpaper.ui.components -import android.text.format.DateUtils import androidx.activity.compose.rememberLauncherForActivityResult import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.Crossfade -import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -17,8 +15,6 @@ import androidx.compose.material.icons.filled.AccessTimeFilled import androidx.compose.material.icons.filled.Delete import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button -import androidx.compose.material3.Card -import androidx.compose.material3.ElevatedCard import androidx.compose.material3.Icon import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -38,17 +34,16 @@ import androidx.core.net.toUri import androidx.documentfile.provider.DocumentFile import androidx.work.NetworkType import com.bnyro.wallpaper.R -import com.bnyro.wallpaper.obj.WallpaperConfig import com.bnyro.wallpaper.enums.WallpaperSource import com.bnyro.wallpaper.enums.WallpaperTarget import com.bnyro.wallpaper.ext.formatMinutes import com.bnyro.wallpaper.ext.formatTime import com.bnyro.wallpaper.ext.toast -import com.bnyro.wallpaper.ext.toastFromMainThread +import com.bnyro.wallpaper.obj.WallpaperConfig import com.bnyro.wallpaper.ui.components.dialogs.TimePickerDialog import com.bnyro.wallpaper.ui.components.prefs.CheckboxPref -import com.bnyro.wallpaper.ui.components.prefs.MultiSelectionBlockPreference import com.bnyro.wallpaper.ui.components.prefs.ListPreference +import com.bnyro.wallpaper.ui.components.prefs.MultiSelectionBlockPreference import com.bnyro.wallpaper.ui.components.prefs.SettingsCategory import com.bnyro.wallpaper.ui.nav.DrawerScreens import com.bnyro.wallpaper.util.PickFolderContract diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperFilterEditor.kt b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperFilterEditor.kt index bbfd84fd..d843eeb9 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperFilterEditor.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperFilterEditor.kt @@ -41,13 +41,13 @@ import coil.compose.rememberAsyncImagePainter import com.bnyro.wallpaper.R import com.bnyro.wallpaper.db.obj.Wallpaper import com.bnyro.wallpaper.enums.ResizeMethod +import com.bnyro.wallpaper.ext.rememberZoomState +import com.bnyro.wallpaper.ext.zoomArea +import com.bnyro.wallpaper.ext.zoomImage import com.bnyro.wallpaper.ui.components.prefs.CheckboxPref import com.bnyro.wallpaper.ui.components.prefs.ListPreference import com.bnyro.wallpaper.ui.models.WallpaperHelperModel import com.bnyro.wallpaper.util.Preferences -import com.bnyro.wallpaper.ext.rememberZoomState -import com.bnyro.wallpaper.ext.zoomArea -import com.bnyro.wallpaper.ext.zoomImage @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperView.kt b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperView.kt index 20514333..68f0e403 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperView.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/components/WallpaperView.kt @@ -39,14 +39,14 @@ import com.bnyro.wallpaper.R import com.bnyro.wallpaper.db.DatabaseHolder.Database import com.bnyro.wallpaper.db.obj.Wallpaper import com.bnyro.wallpaper.enums.MultiState +import com.bnyro.wallpaper.ext.rememberZoomState +import com.bnyro.wallpaper.ext.zoomArea +import com.bnyro.wallpaper.ext.zoomImage import com.bnyro.wallpaper.ui.components.bottombar.BottomBar import com.bnyro.wallpaper.ui.components.bottombar.WallpaperViewTopBar import com.bnyro.wallpaper.ui.components.dialogs.MultiStateDialog import com.bnyro.wallpaper.ui.components.infosheet.WallpaperInfoSheet import com.bnyro.wallpaper.ui.models.WallpaperHelperModel -import com.bnyro.wallpaper.ext.rememberZoomState -import com.bnyro.wallpaper.ext.zoomArea -import com.bnyro.wallpaper.ext.zoomImage import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/components/dialogs/FilterDialog.kt b/app/src/main/java/com/bnyro/wallpaper/ui/components/dialogs/FilterDialog.kt index e8fe4b6a..8e4a9336 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/components/dialogs/FilterDialog.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/components/dialogs/FilterDialog.kt @@ -34,7 +34,6 @@ import com.bnyro.wallpaper.api.CommunityApi import com.bnyro.wallpaper.ext.capitalize import com.bnyro.wallpaper.ui.components.DialogButton import com.bnyro.wallpaper.ui.components.TagsEditor -import java.util.* @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/models/MainModel.kt b/app/src/main/java/com/bnyro/wallpaper/ui/models/MainModel.kt index 197c84ed..58e17a4b 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/models/MainModel.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/models/MainModel.kt @@ -2,7 +2,6 @@ package com.bnyro.wallpaper.ui.models import android.util.Log import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.lifecycle.ViewModel diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/nav/DrawerScreens.kt b/app/src/main/java/com/bnyro/wallpaper/ui/nav/DrawerScreens.kt index 2d2dd6e8..dbb635fe 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/nav/DrawerScreens.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/nav/DrawerScreens.kt @@ -1,18 +1,10 @@ package com.bnyro.wallpaper.ui.nav import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Air -import androidx.compose.material.icons.filled.Book import androidx.compose.material.icons.filled.Favorite -import androidx.compose.material.icons.filled.Forum import androidx.compose.material.icons.filled.History import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.Landscape -import androidx.compose.material.icons.filled.LightMode -import androidx.compose.material.icons.filled.Nightlight -import androidx.compose.material.icons.filled.Pix import androidx.compose.material.icons.filled.Settings -import androidx.compose.material.icons.filled.WaterDrop import androidx.compose.ui.graphics.vector.ImageVector import com.bnyro.wallpaper.App import com.bnyro.wallpaper.R diff --git a/app/src/main/java/com/bnyro/wallpaper/ui/pages/HistoryPage.kt b/app/src/main/java/com/bnyro/wallpaper/ui/pages/HistoryPage.kt index 645cf316..2b9053cb 100644 --- a/app/src/main/java/com/bnyro/wallpaper/ui/pages/HistoryPage.kt +++ b/app/src/main/java/com/bnyro/wallpaper/ui/pages/HistoryPage.kt @@ -3,7 +3,6 @@ package com.bnyro.wallpaper.ui.pages import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.HeartBroken import androidx.compose.material.icons.filled.History import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState diff --git a/app/src/main/java/com/bnyro/wallpaper/util/BackgroundWorker.kt b/app/src/main/java/com/bnyro/wallpaper/util/BackgroundWorker.kt index 80062158..fd0a3826 100644 --- a/app/src/main/java/com/bnyro/wallpaper/util/BackgroundWorker.kt +++ b/app/src/main/java/com/bnyro/wallpaper/util/BackgroundWorker.kt @@ -6,8 +6,8 @@ import androidx.work.CoroutineWorker import androidx.work.WorkerParameters import com.bnyro.wallpaper.db.DatabaseHolder import com.bnyro.wallpaper.db.obj.Wallpaper -import com.bnyro.wallpaper.obj.WallpaperConfig import com.bnyro.wallpaper.enums.WallpaperSource +import com.bnyro.wallpaper.obj.WallpaperConfig import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/app/src/main/java/com/bnyro/wallpaper/util/Preferences.kt b/app/src/main/java/com/bnyro/wallpaper/util/Preferences.kt index 72ce7b7a..888d335c 100644 --- a/app/src/main/java/com/bnyro/wallpaper/util/Preferences.kt +++ b/app/src/main/java/com/bnyro/wallpaper/util/Preferences.kt @@ -5,8 +5,6 @@ import android.content.SharedPreferences import android.util.Log import com.bnyro.wallpaper.App import com.bnyro.wallpaper.obj.WallpaperConfig -import com.bnyro.wallpaper.enums.WallpaperTarget -import com.bnyro.wallpaper.ui.nav.DrawerScreens import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString