Skip to content

Commit

Permalink
Optimise imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 committed Jan 29, 2023
1 parent 166c5a4 commit 7effc51
Show file tree
Hide file tree
Showing 266 changed files with 240 additions and 488 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import android.util.AttributeSet
import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.ViewCompat
import co.anitrend.arch.extension.ext.UNSAFE
import co.anitrend.core.android.R

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import android.content.Context
import android.util.AttributeSet
import android.view.MenuInflater
import android.view.MenuItem
import android.widget.FrameLayout
import androidx.annotation.MenuRes
import co.anitrend.arch.extension.ext.getLayoutInflater
import co.anitrend.arch.extension.ext.gone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import android.view.MenuInflater
import android.view.MenuItem
import androidx.annotation.IdRes
import androidx.annotation.MenuRes
import androidx.appcompat.view.ActionMode

interface IFloatingActionMenu {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@

package co.anitrend.core.android.components.pageindicator;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.animation.Interpolator;

import androidx.viewpager.widget.ViewPager;

import java.util.Arrays;

import co.anitrend.core.android.R;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.animation.Interpolator;

import androidx.viewpager.widget.ViewPager;

import java.util.Arrays;

import co.anitrend.core.android.R;

/**
* An ink inspired widget for indicating pages in a {@link ViewPager}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.os.PowerManager
import co.anitrend.arch.extension.dispatchers.SupportDispatcher
import co.anitrend.arch.extension.dispatchers.contract.ISupportDispatcher
import co.anitrend.arch.extension.ext.systemServiceOf
import co.anitrend.arch.extension.util.date.SupportDateHelper
import co.anitrend.arch.extension.util.date.contract.AbstractSupportDateHelper
import co.anitrend.core.android.controller.power.AndroidPowerController
import co.anitrend.core.android.controller.power.contract.IPowerController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ package co.anitrend.core.android.recycler.decorator

import android.graphics.Rect
import android.view.View
import androidx.annotation.DimenRes
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import co.anitrend.core.android.R
import co.anitrend.core.android.extensions.dp
import com.google.android.flexbox.FlexDirection
import com.google.android.flexbox.FlexboxLayoutManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ package co.anitrend.core.android.recycler.model
import android.content.res.Resources
import android.view.View
import androidx.viewbinding.ViewBinding
import co.anitrend.arch.recycler.action.contract.ISupportSelectionMode
import co.anitrend.arch.recycler.action.decorator.ISelectionDecorator
import co.anitrend.arch.recycler.common.ClickableItem
import co.anitrend.arch.recycler.model.contract.IRecyclerItem
import co.anitrend.core.android.R
import co.anitrend.core.android.binding.IBindingView
import kotlinx.coroutines.flow.MutableStateFlow

abstract class RecyclerItemBinding<B : ViewBinding>(
override val id: Long
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import co.anitrend.arch.extension.settings.contract.AbstractSetting
import co.anitrend.data.settings.customize.common.PreferredViewMode
import kotlinx.coroutines.flow.collect

/**
* Updates [RecyclerView.getLayoutManager] span count and configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import android.content.pm.ShortcutManager
import android.graphics.drawable.Icon
import android.os.Build
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.annotation.RequiresApi
import co.anitrend.core.android.shortcut.contract.IShortcutController
import co.anitrend.core.android.shortcut.model.Shortcut
import co.anitrend.navigation.extensions.forActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package co.anitrend.core.android.shortcut.contract
import android.os.Build
import androidx.annotation.RequiresApi
import co.anitrend.core.android.shortcut.model.Shortcut
import kotlin.jvm.Throws

@RequiresApi(Build.VERSION_CODES.N_MR1)
interface IShortcutController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package co.anitrend.core.android.storage

import android.content.Context
import co.anitrend.data.settings.cache.ICacheSettings
import co.anitrend.core.android.storage.contract.IStorageController
import co.anitrend.core.android.storage.enums.StorageType
import co.anitrend.core.android.storage.extensions.toHumanReadableByteValue
import co.anitrend.data.settings.cache.ICacheSettings
import timber.log.Timber
import java.io.File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package co.anitrend.core.android.storage.contract

import android.content.Context
import co.anitrend.data.settings.cache.ICacheSettings
import co.anitrend.core.android.storage.enums.StorageType
import co.anitrend.data.settings.cache.ICacheSettings
import java.io.File

interface IStorageController {
Expand Down
2 changes: 1 addition & 1 deletion android-core/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<resources xmlns:tools="http://schemas.android.com/tools">
<resources>

<style name="AppTheme.FontFamily" parent="SupportTheme.FontFamily">
<item name="android:fontFamily">@font/product_sans_regular</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package co.anitrend.core.android.settings.helper.locale

import co.anitrend.core.android.settings.helper.locale.model.AniTrendLocale
import co.anitrend.core.android.settings.helper.locale.model.AniTrendLocale.Companion.asLocaleString
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test

class AniTrendLocaleTest {
Expand Down
7 changes: 2 additions & 5 deletions android-deeplink/src/main/res/layout/deep_link_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<co.anitrend.arch.ui.view.widget.SupportStateLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
<co.anitrend.arch.ui.view.widget.SupportStateLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/stateLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
4 changes: 1 addition & 3 deletions android-navigation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import android.view.View
import android.widget.ImageView
import androidx.core.view.marginTop
import androidx.core.view.updatePadding
import co.anitrend.navigation.drawer.R
import co.anitrend.core.android.animations.normalize
import co.anitrend.core.android.components.sheet.action.contract.OnSlideAction
import co.anitrend.navigation.drawer.R
import com.google.android.material.shape.MaterialShapeDrawable


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package co.anitrend.navigation.drawer.provider

import co.anitrend.navigation.drawer.component.content.BottomDrawerContent
import co.anitrend.navigation.NavigationDrawerRouter
import co.anitrend.navigation.drawer.component.content.BottomDrawerContent

class FeatureProvider : NavigationDrawerRouter.Provider {
override fun fragment() = BottomDrawerContent::class.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/accountContainer"
android:layout_width="match_parent"
Expand Down
3 changes: 1 addition & 2 deletions android-navigation/src/main/res/menu/drawer_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
-->

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">

<item
android:orderInCategory="100"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package co.anitrend.onboarding.component.presenter

import android.content.Context
import androidx.core.text.buildSpannedString
import co.anitrend.core.presenter.CorePresenter
import co.anitrend.core.android.settings.Settings
import co.anitrend.core.presenter.CorePresenter
import co.anitrend.navigation.MainRouter
import co.anitrend.navigation.OnBoardingRouter
import co.anitrend.navigation.extensions.startActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import androidx.viewpager.widget.ViewPager
import co.anitrend.arch.extension.ext.hideStatusBarAndNavigationBar
import co.anitrend.core.component.screen.AniTrendScreen
import co.anitrend.core.ui.inject
import co.anitrend.onboarding.databinding.OnboardingScreenBinding
import co.anitrend.onboarding.component.presenter.OnBoardingPresenter
import co.anitrend.onboarding.component.pager.OnBoardingPageAdapter
import co.anitrend.onboarding.component.presenter.OnBoardingPresenter
import co.anitrend.onboarding.databinding.OnboardingScreenBinding
import kotlinx.coroutines.launch

class OnBoardingScreen : AniTrendScreen<OnboardingScreenBinding>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package co.anitrend.onboarding.koin

import co.anitrend.core.koin.helper.DynamicFeatureModuleHelper
import co.anitrend.navigation.OnBoardingRouter
import co.anitrend.onboarding.component.content.OnBoardingContent
import co.anitrend.onboarding.component.presenter.OnBoardingPresenter
import co.anitrend.onboarding.provider.FeatureProvider
import co.anitrend.onboarding.component.screen.OnBoardingScreen
import co.anitrend.onboarding.component.content.OnBoardingContent
import co.anitrend.onboarding.provider.FeatureProvider
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.fragment.dsl.fragment
import org.koin.dsl.module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package co.anitrend.onboarding.provider

import android.content.Context
import android.content.Intent
import androidx.fragment.app.Fragment
import co.anitrend.navigation.OnBoardingRouter
import co.anitrend.onboarding.component.content.OnBoardingContent
import co.anitrend.onboarding.component.screen.OnBoardingScreen
Expand Down
4 changes: 1 addition & 3 deletions android-onboarding/src/main/res/layout/onboarding_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<co.anitrend.onboarding.component.widget.OnBoardingView
xmlns:android="http://schemas.android.com/apk/res/android"
<co.anitrend.onboarding.component.widget.OnBoardingView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:animateLayoutChanges="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package co.anitrend.splash.component.presenter

import android.content.Context
import androidx.fragment.app.FragmentActivity
import co.anitrend.core.presenter.CorePresenter
import co.anitrend.core.android.settings.Settings
import co.anitrend.core.presenter.CorePresenter
import co.anitrend.navigation.MainRouter
import co.anitrend.navigation.OnBoardingRouter
import co.anitrend.navigation.extensions.startActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package co.anitrend.splash.koin

import co.anitrend.core.koin.helper.DynamicFeatureModuleHelper
import co.anitrend.navigation.SplashRouter
import co.anitrend.splash.component.presenter.SplashPresenter
import co.anitrend.splash.provider.FeatureProvider
import co.anitrend.splash.component.content.SplashContent
import co.anitrend.splash.component.presenter.SplashPresenter
import co.anitrend.splash.component.screen.SplashScreen
import co.anitrend.splash.provider.FeatureProvider
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.fragment.dsl.fragment
import org.koin.dsl.module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ abstract class AniTrendViewModelState<T> : ISupportViewModelState<T>,
protected abstract val interactor: IUseCase

override val model = state.switchMap {
Timber.i("Performing `model` switch map using $coroutineContext")
Timber.i("Performing `model` switch map using $coroutineContext on $this")
it.model.asLiveData(coroutineContext)
}

override val loadState = state.switchMap {
Timber.i("Performing `loadState` switch map using $coroutineContext")
Timber.i("Performing `loadState` switch map using $coroutineContext on $this")
it.loadState.asLiveData(coroutineContext)
}

override val refreshState = state.switchMap {
Timber.i("Performing `refreshState` switch map using $coroutineContext")
Timber.i("Performing `refreshState` switch map using $coroutineContext on $this")
it.refreshState.asLiveData(coroutineContext)
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package co.anitrend.core.initializer.logger
import android.content.Context
import android.util.Log
import co.anitrend.core.BuildConfig
import co.anitrend.core.initializer.contract.AbstractCoreInitializer
import co.anitrend.core.android.storage.StorageController
import co.anitrend.core.initializer.contract.AbstractCoreInitializer
import fr.bipi.tressence.file.FileLoggerTree
import timber.log.Timber
import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package co.anitrend.core.initializer.migration
import android.content.Context
import androidx.startup.Initializer
import co.anitrend.core.android.settings.Settings
import co.anitrend.core.initializer.logger.TimberInitializer
import co.anitrend.core.initializer.contract.AbstractCoreInitializer
import co.anitrend.core.initializer.logger.TimberInitializer
import co.anitrend.core.migration.MigrationManager

/**
Expand Down
4 changes: 2 additions & 2 deletions app-core/src/main/kotlin/co/anitrend/core/koin/Modules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ import co.anitrend.arch.theme.extensions.isEnvironmentNightMode
import co.anitrend.arch.ui.view.widget.model.StateLayoutConfig
import co.anitrend.core.R
import co.anitrend.core.android.koin.androidCoreModules
import co.anitrend.core.android.storage.contract.IStorageController
import co.anitrend.core.android.storage.enums.StorageType
import co.anitrend.core.coil.client.CoilRequestClient
import co.anitrend.core.coil.fetch.RequestImageFetcher
import co.anitrend.core.coil.mapper.RequestImageMapper
import co.anitrend.data.android.koin.dataModules
import co.anitrend.data.android.network.model.NetworkMessage
import co.anitrend.core.android.storage.contract.IStorageController
import co.anitrend.core.android.storage.enums.StorageType
import coil.ImageLoader
import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package co.anitrend.core.migration

import android.content.Context
import co.anitrend.core.BuildConfig
import co.anitrend.core.android.settings.Settings
import co.anitrend.core.migration.contract.AbstractMigrationManager
import co.anitrend.core.migration.model.Migration
import co.anitrend.core.migration.model.Migrations
import co.anitrend.core.android.settings.Settings
import timber.log.Timber

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package co.anitrend.core.migration.contract

import co.anitrend.core.migration.model.Migration
import co.anitrend.core.android.settings.Settings
import co.anitrend.core.migration.model.Migration

internal abstract class AbstractMigrationManager : IMigrationManager {
protected abstract val settings: Settings
Expand Down
Loading

0 comments on commit 7effc51

Please sign in to comment.