From 0fe350af9a14827ba131e41b93beab8108b46518 Mon Sep 17 00:00:00 2001 From: len Date: Fri, 27 May 2016 13:21:21 +0200 Subject: [PATCH] Minor classes restructuration and optimize imports --- .../data/download/DownloadManager.kt | 4 +- .../data/download/model/Download.java | 2 +- .../tachiyomi/data/glide/MangaModelLoader.kt | 2 +- .../data/library/LibraryUpdateService.kt | 2 +- .../data/preference/PreferencesHelper.kt | 2 +- .../data/source/{base => }/Source.kt | 2 +- .../tachiyomi/data/source/SourceManager.kt | 9 +- .../source/{base => online}/OnlineSource.kt | 3 +- .../{base => online}/ParsedOnlineSource.kt | 2 +- .../{base => online}/YamlOnlineSource.kt | 2 +- .../YamlOnlineSourceMappings.kt | 2 +- .../data/source/online/english/Batoto.kt | 2 +- .../data/source/online/english/Kissmanga.kt | 2 +- .../data/source/online/english/Mangafox.kt | 2 +- .../data/source/online/english/Mangahere.kt | 2 +- .../source/online/english/Readmangatoday.kt | 2 +- .../data/source/online/russian/Mangachan.kt | 2 +- .../data/source/online/russian/Mintmanga.kt | 2 +- .../data/source/online/russian/Readmanga.kt | 2 +- .../injection/component/AppComponent.kt | 4 +- .../decoration/DividerItemDecoration.java | 78 ----------------- .../ui/catalogue/CatalogueFragment.kt | 2 +- .../ui/catalogue/CataloguePresenter.kt | 4 +- .../ui/manga/chapter/ChaptersFragment.kt | 2 +- .../ui/manga/chapter/ChaptersPresenter.kt | 2 +- .../ui/manga/info/MangaInfoFragment.kt | 4 +- .../ui/manga/info/MangaInfoPresenter.kt | 2 +- .../myanimelist/MyAnimeListDialogFragment.kt | 2 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 4 +- .../tachiyomi/ui/reader/ReaderPopupMenu.kt | 2 +- .../tachiyomi/ui/reader/ReaderPresenter.kt | 4 +- .../ui/recent/RecentChaptersFragment.kt | 2 +- .../ui/setting/SettingsSourcesFragment.kt | 2 +- .../tachiyomi/util/ChapterSourceSync.kt | 4 +- .../tachiyomi/widget/DividerItemDecoration.kt | 83 +++++++++++++++++++ .../base/fab => widget}/FABAnimationBase.kt | 2 +- .../base/fab => widget}/FABAnimationUpDown.kt | 2 +- .../SimpleAnimationListener.kt | 2 +- .../SimpleSeekBarListener.kt | 2 +- .../listener => widget}/SimpleTextWatcher.kt | 2 +- .../preference/LoginDialogPreference.kt | 2 +- .../widget/preference/SourceLoginDialog.kt | 4 +- app/src/main/res/values/styles.xml | 2 +- .../library/LibraryUpdateServiceTest.java | 2 +- 44 files changed, 138 insertions(+), 131 deletions(-) rename app/src/main/java/eu/kanade/tachiyomi/data/source/{base => }/Source.kt (96%) rename app/src/main/java/eu/kanade/tachiyomi/data/source/{base => online}/OnlineSource.kt (99%) rename app/src/main/java/eu/kanade/tachiyomi/data/source/{base => online}/ParsedOnlineSource.kt (99%) rename app/src/main/java/eu/kanade/tachiyomi/data/source/{base => online}/YamlOnlineSource.kt (99%) rename app/src/main/java/eu/kanade/tachiyomi/data/source/{base => online}/YamlOnlineSourceMappings.kt (99%) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/ui/base/decoration/DividerItemDecoration.java create mode 100644 app/src/main/java/eu/kanade/tachiyomi/widget/DividerItemDecoration.kt rename app/src/main/java/eu/kanade/tachiyomi/{ui/base/fab => widget}/FABAnimationBase.kt (97%) rename app/src/main/java/eu/kanade/tachiyomi/{ui/base/fab => widget}/FABAnimationUpDown.kt (97%) rename app/src/main/java/eu/kanade/tachiyomi/{ui/base/listener => widget}/SimpleAnimationListener.kt (86%) rename app/src/main/java/eu/kanade/tachiyomi/{ui/base/listener => widget}/SimpleSeekBarListener.kt (87%) rename app/src/main/java/eu/kanade/tachiyomi/{ui/base/listener => widget}/SimpleTextWatcher.kt (88%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index 1350218add..4256446824 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt @@ -12,10 +12,10 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.download.model.DownloadQueue import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.util.DiskUtils import eu.kanade.tachiyomi.util.DynamicConcurrentMergeOperator import eu.kanade.tachiyomi.util.UrlUtil diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/Download.java b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/Download.java index 8bd19fbf48..65409969d5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/Download.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/Download.java @@ -5,8 +5,8 @@ import java.util.List; import eu.kanade.tachiyomi.data.database.models.Chapter; import eu.kanade.tachiyomi.data.database.models.Manga; -import eu.kanade.tachiyomi.data.source.base.OnlineSource; import eu.kanade.tachiyomi.data.source.model.Page; +import eu.kanade.tachiyomi.data.source.online.OnlineSource; import rx.subjects.PublishSubject; public class Download { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaModelLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaModelLoader.kt index c5fa164139..0f3b24d560 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaModelLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaModelLoader.kt @@ -9,7 +9,7 @@ import eu.kanade.tachiyomi.App import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.OnlineSource +import eu.kanade.tachiyomi.data.source.online.OnlineSource import java.io.File import java.io.InputStream import javax.inject.Inject diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index c942c08fa2..a56af3a532 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.data.database.models.Category import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.OnlineSource +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.util.* import rx.Observable diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 91d926e28d..a0813c7a96 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -7,7 +7,7 @@ import com.f2prateek.rx.preferences.Preference import com.f2prateek.rx.preferences.RxSharedPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.mangasync.base.MangaSyncService -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source import java.io.File import java.io.IOException diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/Source.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/Source.kt similarity index 96% rename from app/src/main/java/eu/kanade/tachiyomi/data/source/base/Source.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/source/Source.kt index d9a7225c31..d7fd5c5c17 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/Source.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/Source.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.source.base +package eu.kanade.tachiyomi.data.source import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/SourceManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/SourceManager.kt index 6802c72ef5..7a64f34014 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/SourceManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/SourceManager.kt @@ -3,11 +3,12 @@ package eu.kanade.tachiyomi.data.source import android.content.Context import android.os.Environment import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source -import eu.kanade.tachiyomi.data.source.base.YamlOnlineSource +import eu.kanade.tachiyomi.data.source.online.OnlineSource +import eu.kanade.tachiyomi.data.source.online.YamlOnlineSource import eu.kanade.tachiyomi.data.source.online.english.* -import eu.kanade.tachiyomi.data.source.online.russian.* +import eu.kanade.tachiyomi.data.source.online.russian.Mangachan +import eu.kanade.tachiyomi.data.source.online.russian.Mintmanga +import eu.kanade.tachiyomi.data.source.online.russian.Readmanga import org.yaml.snakeyaml.Yaml import timber.log.Timber import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/OnlineSource.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/OnlineSource.kt similarity index 99% rename from app/src/main/java/eu/kanade/tachiyomi/data/source/base/OnlineSource.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/source/online/OnlineSource.kt index 83e135472e..ff50a8a720 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/OnlineSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/OnlineSource.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.source.base +package eu.kanade.tachiyomi.data.source.online import android.content.Context import eu.kanade.tachiyomi.App @@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.network.NetworkHelper import eu.kanade.tachiyomi.data.network.get import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.source.Language +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.model.MangasPage import eu.kanade.tachiyomi.data.source.model.Page import okhttp3.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/ParsedOnlineSource.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/ParsedOnlineSource.kt similarity index 99% rename from app/src/main/java/eu/kanade/tachiyomi/data/source/base/ParsedOnlineSource.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/source/online/ParsedOnlineSource.kt index 8a17878bd9..78a7af5816 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/ParsedOnlineSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/ParsedOnlineSource.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.source.base +package eu.kanade.tachiyomi.data.source.online import android.content.Context import eu.kanade.tachiyomi.data.database.models.Chapter diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSource.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSource.kt similarity index 99% rename from app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSource.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSource.kt index 0fcc6fe2c0..2acf7d22ff 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSource.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.source.base +package eu.kanade.tachiyomi.data.source.online import android.content.Context import eu.kanade.tachiyomi.data.database.models.Chapter diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSourceMappings.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSourceMappings.kt similarity index 99% rename from app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSourceMappings.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSourceMappings.kt index 5e1d3b9ae1..e819dfd53a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/base/YamlOnlineSourceMappings.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/YamlOnlineSourceMappings.kt @@ -1,6 +1,6 @@ @file:Suppress("UNCHECKED_CAST") -package eu.kanade.tachiyomi.data.source.base +package eu.kanade.tachiyomi.data.source.online import eu.kanade.tachiyomi.data.database.models.Manga import okhttp3.FormBody diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Batoto.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Batoto.kt index 65e1a44f8c..e12d5ff7df 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Batoto.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Batoto.kt @@ -9,9 +9,9 @@ import eu.kanade.tachiyomi.data.network.get import eu.kanade.tachiyomi.data.network.post import eu.kanade.tachiyomi.data.source.EN import eu.kanade.tachiyomi.data.source.Language -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.MangasPage import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.FormBody import okhttp3.Request import okhttp3.Response diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Kissmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Kissmanga.kt index 2e2da4d8ad..0003e85563 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Kissmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Kissmanga.kt @@ -7,9 +7,9 @@ import eu.kanade.tachiyomi.data.network.get import eu.kanade.tachiyomi.data.network.post import eu.kanade.tachiyomi.data.source.EN import eu.kanade.tachiyomi.data.source.Language -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.MangasPage import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.FormBody import okhttp3.OkHttpClient import okhttp3.Request diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt index 4cbdc7179b..660ac0e121 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt @@ -5,8 +5,8 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.EN import eu.kanade.tachiyomi.data.source.Language -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.Response import org.jsoup.Jsoup import org.jsoup.nodes.Document diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangahere.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangahere.kt index eb3d88818f..b98252633f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangahere.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangahere.kt @@ -5,8 +5,8 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.EN import eu.kanade.tachiyomi.data.source.Language -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import org.jsoup.nodes.Document import org.jsoup.nodes.Element import java.text.ParseException diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Readmangatoday.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Readmangatoday.kt index b278b1c140..95d02492ce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Readmangatoday.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Readmangatoday.kt @@ -6,9 +6,9 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.network.post import eu.kanade.tachiyomi.data.source.EN import eu.kanade.tachiyomi.data.source.Language -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.MangasPage import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.Request import org.jsoup.nodes.Document import org.jsoup.nodes.Element diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt index 277b6b8428..18536acbef 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt @@ -5,8 +5,8 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.Language import eu.kanade.tachiyomi.data.source.RU -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mintmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mintmanga.kt index 4ba85729a4..723a8e281a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mintmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mintmanga.kt @@ -5,8 +5,8 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.Language import eu.kanade.tachiyomi.data.source.RU -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Readmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Readmanga.kt index d2f6d9e1ab..0ef28b0f87 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Readmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Readmanga.kt @@ -5,8 +5,8 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.source.Language import eu.kanade.tachiyomi.data.source.RU -import eu.kanade.tachiyomi.data.source.base.ParsedOnlineSource import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.ParsedOnlineSource import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element diff --git a/app/src/main/java/eu/kanade/tachiyomi/injection/component/AppComponent.kt b/app/src/main/java/eu/kanade/tachiyomi/injection/component/AppComponent.kt index 65ca31cc53..d7862d3a3a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/injection/component/AppComponent.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/injection/component/AppComponent.kt @@ -8,8 +8,8 @@ import eu.kanade.tachiyomi.data.glide.MangaModelLoader import eu.kanade.tachiyomi.data.library.LibraryUpdateService import eu.kanade.tachiyomi.data.mangasync.UpdateMangaSyncService import eu.kanade.tachiyomi.data.mangasync.base.MangaSyncService -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.data.updater.UpdateDownloader import eu.kanade.tachiyomi.injection.module.AppModule import eu.kanade.tachiyomi.injection.module.DataModule diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/decoration/DividerItemDecoration.java b/app/src/main/java/eu/kanade/tachiyomi/ui/base/decoration/DividerItemDecoration.java deleted file mode 100644 index 8c7469d8ea..0000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/decoration/DividerItemDecoration.java +++ /dev/null @@ -1,78 +0,0 @@ -package eu.kanade.tachiyomi.ui.base.decoration; - -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.Canvas; -import android.graphics.Rect; -import android.graphics.drawable.Drawable; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.util.AttributeSet; -import android.view.View; - -public class DividerItemDecoration extends RecyclerView.ItemDecoration { - - private final Drawable mDivider; - - public DividerItemDecoration(Context context, AttributeSet attrs) { - final TypedArray a = context.obtainStyledAttributes(attrs, new int [] { android.R.attr.listDivider }); - mDivider = a.getDrawable(0); - a.recycle(); - } - - public DividerItemDecoration(Drawable divider) { mDivider = divider; } - - @Override - public void getItemOffsets (Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { - super.getItemOffsets(outRect, view, parent, state); - if (mDivider == null) return; - if (parent.getChildPosition(view) < 1) return; - - if (getOrientation(parent) == LinearLayoutManager.VERTICAL) outRect.top = mDivider.getIntrinsicHeight(); - else outRect.left = mDivider.getIntrinsicWidth(); - } - - @Override - public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) { - if (mDivider == null) { super.onDrawOver(c, parent, state); return; } - - if (getOrientation(parent) == LinearLayoutManager.VERTICAL) { - final int left = parent.getPaddingLeft(); - final int right = parent.getWidth() - parent.getPaddingRight(); - final int childCount = parent.getChildCount(); - final int dividerHeight = mDivider.getIntrinsicHeight(); - - for (int i=1; i < childCount; i++) { - final View child = parent.getChildAt(i); - final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams(); - final int ty = (int)(child.getTranslationY() + 0.5f); - final int top = child.getTop() - params.topMargin + ty; - final int bottom = top + dividerHeight; - mDivider.setBounds(left, top, right, bottom); - mDivider.draw(c); - } - } else { //horizontal - final int top = parent.getPaddingTop(); - final int bottom = parent.getHeight() - parent.getPaddingBottom(); - final int childCount = parent.getChildCount(); - - for (int i=1; i < childCount; i++) { - final View child = parent.getChildAt(i); - final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams(); - final int size = mDivider.getIntrinsicWidth(); - final int left = child.getLeft() - params.leftMargin; - final int right = left + size; - mDivider.setBounds(left, top, right, bottom); - mDivider.draw(c); - } - } - } - - private int getOrientation(RecyclerView parent) { - if (parent.getLayoutManager() instanceof LinearLayoutManager) { - LinearLayoutManager layoutManager = (LinearLayoutManager) parent.getLayoutManager(); - return layoutManager.getOrientation(); - } else throw new IllegalStateException("DividerItemDecoration can only be used with a LinearLayoutManager."); - } - -} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt index a88ee4c80b..adc8b654dd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueFragment.kt @@ -16,13 +16,13 @@ import com.f2prateek.rx.preferences.Preference import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder -import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.manga.MangaActivity import eu.kanade.tachiyomi.util.getResourceDrawable import eu.kanade.tachiyomi.util.snack import eu.kanade.tachiyomi.util.toast +import eu.kanade.tachiyomi.widget.DividerItemDecoration import eu.kanade.tachiyomi.widget.EndlessScrollListener import eu.kanade.tachiyomi.widget.NpaLinearLayoutManager import kotlinx.android.synthetic.main.fragment_catalogue.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CataloguePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CataloguePresenter.kt index cc9f43098b..76d833cbb4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CataloguePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CataloguePresenter.kt @@ -7,10 +7,10 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.data.source.EN +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source import eu.kanade.tachiyomi.data.source.model.MangasPage +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter import eu.kanade.tachiyomi.util.RxPager import rx.Observable diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.kt index 027d45d61c..ddd107e051 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.kt @@ -14,7 +14,6 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder -import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.manga.MangaActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity @@ -22,6 +21,7 @@ import eu.kanade.tachiyomi.util.getCoordinates import eu.kanade.tachiyomi.util.getResourceDrawable import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.DeletingChaptersDialog +import eu.kanade.tachiyomi.widget.DividerItemDecoration import eu.kanade.tachiyomi.widget.NpaLinearLayoutManager import kotlinx.android.synthetic.main.fragment_manga_chapters.* import nucleus.factory.RequiresPresenter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt index 264bde1d38..9c5b9e4221 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt @@ -8,8 +8,8 @@ import eu.kanade.tachiyomi.data.download.DownloadManager import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.preference.PreferencesHelper +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.Source import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter import eu.kanade.tachiyomi.ui.manga.MangaEvent import eu.kanade.tachiyomi.ui.manga.info.ChapterCountEvent diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoFragment.kt index c79688d2a0..ffdda1949a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoFragment.kt @@ -8,8 +8,8 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.util.getResourceColor import eu.kanade.tachiyomi.util.toast diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoPresenter.kt index cb04354ec3..d917fc99d5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoPresenter.kt @@ -4,8 +4,8 @@ import android.os.Bundle import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.models.Manga +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.Source import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter import eu.kanade.tachiyomi.ui.manga.MangaEvent import eu.kanade.tachiyomi.util.SharedData diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListDialogFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListDialogFragment.kt index 1f4fec6f1a..9cccdcb8ee 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListDialogFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListDialogFragment.kt @@ -7,7 +7,7 @@ import android.view.View import com.afollestad.materialdialogs.MaterialDialog import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.MangaSync -import eu.kanade.tachiyomi.ui.base.listener.SimpleTextWatcher +import eu.kanade.tachiyomi.widget.SimpleTextWatcher import kotlinx.android.synthetic.main.dialog_myanimelist_search.view.* import rx.Subscription import rx.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index c364a21628..464b17547c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -22,8 +22,6 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.data.source.model.Page import eu.kanade.tachiyomi.ui.base.activity.BaseRxActivity -import eu.kanade.tachiyomi.ui.base.listener.SimpleAnimationListener -import eu.kanade.tachiyomi.ui.base.listener.SimpleSeekBarListener import eu.kanade.tachiyomi.ui.reader.viewer.base.BaseReader import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.LeftToRightReader import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.RightToLeftReader @@ -32,6 +30,8 @@ import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonReader import eu.kanade.tachiyomi.util.GLUtil import eu.kanade.tachiyomi.util.SharedData import eu.kanade.tachiyomi.util.toast +import eu.kanade.tachiyomi.widget.SimpleAnimationListener +import eu.kanade.tachiyomi.widget.SimpleSeekBarListener import kotlinx.android.synthetic.main.activity_reader.* import kotlinx.android.synthetic.main.reader_menu.* import nucleus.factory.RequiresPresenter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPopupMenu.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPopupMenu.kt index 579823b385..2829f29d42 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPopupMenu.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPopupMenu.kt @@ -10,7 +10,7 @@ import com.afollestad.materialdialogs.MaterialDialog import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault -import eu.kanade.tachiyomi.ui.base.listener.SimpleSeekBarListener +import eu.kanade.tachiyomi.widget.SimpleSeekBarListener import kotlinx.android.synthetic.main.reader_popup.view.* import java.lang.ref.WeakReference diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index c21217683f..e8923c6d3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -11,10 +11,10 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.mangasync.MangaSyncManager import eu.kanade.tachiyomi.data.mangasync.UpdateMangaSyncService import eu.kanade.tachiyomi.data.preference.PreferencesHelper +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.SourceManager -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source import eu.kanade.tachiyomi.data.source.model.Page +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter import eu.kanade.tachiyomi.util.SharedData import rx.Observable diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt index 2b114236cd..3f6b93ebd7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt @@ -9,12 +9,12 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.MangaChapter import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder -import eu.kanade.tachiyomi.ui.base.decoration.DividerItemDecoration import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.getResourceDrawable import eu.kanade.tachiyomi.widget.DeletingChaptersDialog +import eu.kanade.tachiyomi.widget.DividerItemDecoration import eu.kanade.tachiyomi.widget.NpaLinearLayoutManager import kotlinx.android.synthetic.main.fragment_recent_chapters.* import nucleus.factory.RequiresPresenter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesFragment.kt index 9d236af08c..6272694076 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesFragment.kt @@ -7,7 +7,7 @@ import android.support.v7.preference.Preference import android.support.v7.preference.PreferenceGroup import android.view.View import eu.kanade.tachiyomi.data.preference.getOrDefault -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source import eu.kanade.tachiyomi.data.source.getLanguages import eu.kanade.tachiyomi.widget.preference.LoginPreference import eu.kanade.tachiyomi.widget.preference.SourceLoginDialog diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/ChapterSourceSync.kt b/app/src/main/java/eu/kanade/tachiyomi/util/ChapterSourceSync.kt index f43decf3a0..b654661759 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/ChapterSourceSync.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/ChapterSourceSync.kt @@ -3,8 +3,8 @@ package eu.kanade.tachiyomi.util import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source +import eu.kanade.tachiyomi.data.source.online.OnlineSource import java.util.* /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/DividerItemDecoration.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/DividerItemDecoration.kt new file mode 100644 index 0000000000..d752ac6fb4 --- /dev/null +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/DividerItemDecoration.kt @@ -0,0 +1,83 @@ +package eu.kanade.tachiyomi.widget + +import android.content.Context +import android.graphics.Canvas +import android.graphics.Rect +import android.graphics.drawable.Drawable +import android.support.v7.widget.LinearLayoutManager +import android.support.v7.widget.RecyclerView +import android.util.AttributeSet +import android.view.View + +class DividerItemDecoration : RecyclerView.ItemDecoration { + + private val divider: Drawable? + + constructor(context: Context, attrs: AttributeSet) { + val a = context.obtainStyledAttributes(attrs, intArrayOf(android.R.attr.listDivider)) + divider = a.getDrawable(0) + a.recycle() + } + + constructor(divider: Drawable) { + this.divider = divider + } + + override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State?) { + super.getItemOffsets(outRect, view, parent, state) + if (divider == null) return + if (parent.getChildPosition(view) < 1) return + + if (getOrientation(parent) == LinearLayoutManager.VERTICAL) + outRect.top = divider.intrinsicHeight + else + outRect.left = divider.intrinsicWidth + } + + override fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State?) { + if (divider == null) { + super.onDrawOver(c, parent, state) + return + } + + if (getOrientation(parent) == LinearLayoutManager.VERTICAL) { + val left = parent.paddingLeft + val right = parent.width - parent.paddingRight + val childCount = parent.childCount + val dividerHeight = divider.intrinsicHeight + + for (i in 1..childCount - 1) { + val child = parent.getChildAt(i) + val params = child.layoutParams as RecyclerView.LayoutParams + val ty = (child.translationY + 0.5f).toInt() + val top = child.top - params.topMargin + ty + val bottom = top + dividerHeight + divider.setBounds(left, top, right, bottom) + divider.draw(c) + } + } else { //horizontal + val top = parent.paddingTop + val bottom = parent.height - parent.paddingBottom + val childCount = parent.childCount + + for (i in 1..childCount - 1) { + val child = parent.getChildAt(i) + val params = child.layoutParams as RecyclerView.LayoutParams + val size = divider.intrinsicWidth + val left = child.left - params.leftMargin + val right = left + size + divider.setBounds(left, top, right, bottom) + divider.draw(c) + } + } + } + + private fun getOrientation(parent: RecyclerView): Int { + if (parent.layoutManager is LinearLayoutManager) { + val layoutManager = parent.layoutManager as LinearLayoutManager + return layoutManager.orientation + } else + throw IllegalStateException("DividerItemDecoration can only be used with a LinearLayoutManager.") + } + +} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationBase.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationBase.kt similarity index 97% rename from app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationBase.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationBase.kt index 0ad485ff90..cfffeb5996 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationBase.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationBase.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.ui.base.fab +package eu.kanade.tachiyomi.widget import android.support.design.widget.CoordinatorLayout import android.support.design.widget.FloatingActionButton diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationUpDown.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationUpDown.kt similarity index 97% rename from app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationUpDown.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationUpDown.kt index 7ff12b7c8e..3fa25c4d00 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/fab/FABAnimationUpDown.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/FABAnimationUpDown.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.ui.base.fab +package eu.kanade.tachiyomi.widget import android.content.Context import android.support.design.widget.FloatingActionButton diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleAnimationListener.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleAnimationListener.kt similarity index 86% rename from app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleAnimationListener.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/SimpleAnimationListener.kt index cb877b2bbf..12a2b4ef22 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleAnimationListener.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleAnimationListener.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.ui.base.listener +package eu.kanade.tachiyomi.widget import android.view.animation.Animation diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleSeekBarListener.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleSeekBarListener.kt similarity index 87% rename from app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleSeekBarListener.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/SimpleSeekBarListener.kt index 7d8bb3fceb..f0599159d0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleSeekBarListener.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleSeekBarListener.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.ui.base.listener +package eu.kanade.tachiyomi.widget import android.widget.SeekBar diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleTextWatcher.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleTextWatcher.kt similarity index 88% rename from app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleTextWatcher.kt rename to app/src/main/java/eu/kanade/tachiyomi/widget/SimpleTextWatcher.kt index f88f5299af..ee39d58719 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/listener/SimpleTextWatcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleTextWatcher.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.ui.base.listener +package eu.kanade.tachiyomi.widget import android.text.Editable import android.text.TextWatcher diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt index e2d254b486..41de3f25b8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt @@ -11,8 +11,8 @@ import com.afollestad.materialdialogs.MaterialDialog import com.dd.processbutton.iml.ActionProcessButton import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.PreferencesHelper -import eu.kanade.tachiyomi.ui.base.listener.SimpleTextWatcher import eu.kanade.tachiyomi.ui.setting.SettingsActivity +import eu.kanade.tachiyomi.widget.SimpleTextWatcher import kotlinx.android.synthetic.main.pref_account_login.view.* import rx.Subscription diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt index 88c4018692..dd39dfab04 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt @@ -3,8 +3,8 @@ package eu.kanade.tachiyomi.widget.preference import android.os.Bundle import android.view.View import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.data.source.base.OnlineSource -import eu.kanade.tachiyomi.data.source.base.Source +import eu.kanade.tachiyomi.data.source.Source +import eu.kanade.tachiyomi.data.source.online.OnlineSource import eu.kanade.tachiyomi.ui.setting.SettingsActivity import eu.kanade.tachiyomi.util.toast import kotlinx.android.synthetic.main.pref_account_login.view.* diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9a942d5962..ae9a3c45f7 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -134,7 +134,7 @@ fitCenter bottom|right|end @color/md_white_1000 - eu.kanade.tachiyomi.ui.base.fab.FABAnimationUpDown + eu.kanade.tachiyomi.widget.FABAnimationUpDown