From 915847c0edb0c92be6cdb7fb44761615b61806e3 Mon Sep 17 00:00:00 2001 From: inorichi Date: Wed, 21 Oct 2015 00:18:55 +0200 Subject: [PATCH] Rename viewer to reader --- app/src/main/AndroidManifest.xml | 2 +- .../java/eu/kanade/mangafeed/AppComponent.java | 4 ++-- .../{ViewerPresenter.java => ReaderPresenter.java} | 6 +++--- .../{ViewerActivity.java => ReaderActivity.java} | 14 +++++++------- ...ewerPageAdapter.java => ReaderPageAdapter.java} | 8 ++++---- .../ui/fragment/MangaChaptersFragment.java | 4 ++-- ...erPageFragment.java => ReaderPageFragment.java} | 6 +++--- 7 files changed, 22 insertions(+), 22 deletions(-) rename app/src/main/java/eu/kanade/mangafeed/presenter/{ViewerPresenter.java => ReaderPresenter.java} (93%) rename app/src/main/java/eu/kanade/mangafeed/ui/activity/{ViewerActivity.java => ReaderActivity.java} (65%) rename app/src/main/java/eu/kanade/mangafeed/ui/adapter/{ViewerPageAdapter.java => ReaderPageAdapter.java} (71%) rename app/src/main/java/eu/kanade/mangafeed/ui/fragment/{ViewerPageFragment.java => ReaderPageFragment.java} (93%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 152ca7f383..957876e954 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -38,7 +38,7 @@ android:value="eu.kanade.mangafeed.ui.activity.MainActivity" /> diff --git a/app/src/main/java/eu/kanade/mangafeed/AppComponent.java b/app/src/main/java/eu/kanade/mangafeed/AppComponent.java index 758f1e3340..14c8f97dd0 100644 --- a/app/src/main/java/eu/kanade/mangafeed/AppComponent.java +++ b/app/src/main/java/eu/kanade/mangafeed/AppComponent.java @@ -13,7 +13,7 @@ import eu.kanade.mangafeed.presenter.MangaChaptersPresenter; import eu.kanade.mangafeed.presenter.MangaDetailPresenter; import eu.kanade.mangafeed.presenter.MangaInfoPresenter; import eu.kanade.mangafeed.presenter.SourcePresenter; -import eu.kanade.mangafeed.presenter.ViewerPresenter; +import eu.kanade.mangafeed.presenter.ReaderPresenter; @Singleton @Component( @@ -31,7 +31,7 @@ public interface AppComponent { void inject(CataloguePresenter cataloguePresenter); void inject(MangaInfoPresenter mangaInfoPresenter); void inject(MangaChaptersPresenter mangaChaptersPresenter); - void inject(ViewerPresenter viewerPresenter); + void inject(ReaderPresenter readerPresenter); Application application(); diff --git a/app/src/main/java/eu/kanade/mangafeed/presenter/ViewerPresenter.java b/app/src/main/java/eu/kanade/mangafeed/presenter/ReaderPresenter.java similarity index 93% rename from app/src/main/java/eu/kanade/mangafeed/presenter/ViewerPresenter.java rename to app/src/main/java/eu/kanade/mangafeed/presenter/ReaderPresenter.java index e736a39f8f..b2af627051 100644 --- a/app/src/main/java/eu/kanade/mangafeed/presenter/ViewerPresenter.java +++ b/app/src/main/java/eu/kanade/mangafeed/presenter/ReaderPresenter.java @@ -11,14 +11,14 @@ import eu.kanade.mangafeed.data.caches.CacheManager; import eu.kanade.mangafeed.data.models.Chapter; import eu.kanade.mangafeed.data.models.Page; import eu.kanade.mangafeed.sources.Source; -import eu.kanade.mangafeed.ui.activity.ViewerActivity; +import eu.kanade.mangafeed.ui.activity.ReaderActivity; import eu.kanade.mangafeed.util.EventBusHook; import eu.kanade.mangafeed.util.events.SourceChapterEvent; import rx.Observable; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; -public class ViewerPresenter extends BasePresenter { +public class ReaderPresenter extends BasePresenter { private static final int GET_PAGE_LIST = 1; private Source source; @@ -38,7 +38,7 @@ public class ViewerPresenter extends BasePresenter { } @Override - protected void onTakeView(ViewerActivity view) { + protected void onTakeView(ReaderActivity view) { super.onTakeView(view); registerForStickyEvents(); } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/activity/ViewerActivity.java b/app/src/main/java/eu/kanade/mangafeed/ui/activity/ReaderActivity.java similarity index 65% rename from app/src/main/java/eu/kanade/mangafeed/ui/activity/ViewerActivity.java rename to app/src/main/java/eu/kanade/mangafeed/ui/activity/ReaderActivity.java index 8c641a9ed0..67556b9ef4 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/activity/ViewerActivity.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/activity/ReaderActivity.java @@ -8,19 +8,19 @@ import android.support.v4.view.ViewPager; import butterknife.Bind; import butterknife.ButterKnife; import eu.kanade.mangafeed.R; -import eu.kanade.mangafeed.presenter.ViewerPresenter; -import eu.kanade.mangafeed.ui.adapter.ViewerPageAdapter; +import eu.kanade.mangafeed.presenter.ReaderPresenter; +import eu.kanade.mangafeed.ui.adapter.ReaderPageAdapter; import nucleus.factory.RequiresPresenter; -@RequiresPresenter(ViewerPresenter.class) -public class ViewerActivity extends BaseActivity { +@RequiresPresenter(ReaderPresenter.class) +public class ReaderActivity extends BaseActivity { @Bind(R.id.view_pager) ViewPager viewPager; - private ViewerPageAdapter adapter; + private ReaderPageAdapter adapter; public static Intent newInstance(Context context) { - return new Intent(context, ViewerActivity.class); + return new Intent(context, ReaderActivity.class); } @Override @@ -33,7 +33,7 @@ public class ViewerActivity extends BaseActivity { } private void createAdapter() { - adapter = new ViewerPageAdapter(getSupportFragmentManager()); + adapter = new ReaderPageAdapter(getSupportFragmentManager()); viewPager.setAdapter(adapter); } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ViewerPageAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ReaderPageAdapter.java similarity index 71% rename from app/src/main/java/eu/kanade/mangafeed/ui/adapter/ViewerPageAdapter.java rename to app/src/main/java/eu/kanade/mangafeed/ui/adapter/ReaderPageAdapter.java index f6e50f2328..a3c7ca5601 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ViewerPageAdapter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ReaderPageAdapter.java @@ -5,13 +5,13 @@ import android.support.v4.app.FragmentManager; import java.util.List; -import eu.kanade.mangafeed.ui.fragment.ViewerPageFragment; +import eu.kanade.mangafeed.ui.fragment.ReaderPageFragment; -public class ViewerPageAdapter extends SmartFragmentStatePagerAdapter { +public class ReaderPageAdapter extends SmartFragmentStatePagerAdapter { private List imageUrls; - public ViewerPageAdapter(FragmentManager fragmentManager) { + public ReaderPageAdapter(FragmentManager fragmentManager) { super(fragmentManager); } @@ -25,7 +25,7 @@ public class ViewerPageAdapter extends SmartFragmentStatePagerAdapter { @Override public Fragment getItem(int position) { - return ViewerPageFragment.newInstance(imageUrls.get(position), position); + return ReaderPageFragment.newInstance(imageUrls.get(position), position); } public List getImageUrls() { diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java index d9e2102908..8878568b94 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java @@ -21,7 +21,7 @@ import eu.kanade.mangafeed.R; import eu.kanade.mangafeed.data.models.Chapter; import eu.kanade.mangafeed.presenter.MangaChaptersPresenter; import eu.kanade.mangafeed.ui.activity.MangaDetailActivity; -import eu.kanade.mangafeed.ui.activity.ViewerActivity; +import eu.kanade.mangafeed.ui.activity.ReaderActivity; import eu.kanade.mangafeed.ui.adapter.ChapterListHolder; import nucleus.factory.RequiresPresenter; import uk.co.ribot.easyadapter.EasyRecyclerAdapter; @@ -77,7 +77,7 @@ public class MangaChaptersFragment extends BaseFragment private void createAdapter() { ChapterListHolder.ChapterListener listener = chapter -> { getPresenter().onChapterClicked(chapter); - Intent intent = ViewerActivity.newInstance(getActivity()); + Intent intent = ReaderActivity.newInstance(getActivity()); startActivity(intent); }; diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/ViewerPageFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/ReaderPageFragment.java similarity index 93% rename from app/src/main/java/eu/kanade/mangafeed/ui/fragment/ViewerPageFragment.java rename to app/src/main/java/eu/kanade/mangafeed/ui/fragment/ReaderPageFragment.java index 56640932c6..467bc7feea 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/ViewerPageFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/ReaderPageFragment.java @@ -13,15 +13,15 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; import eu.kanade.mangafeed.R; import eu.kanade.mangafeed.util.PageFileTarget; -public class ViewerPageFragment extends Fragment { +public class ReaderPageFragment extends Fragment { public static final String URL_ARGUMENT_KEY = "UrlArgumentKey"; private SubsamplingScaleImageView mPageImageView; private String mUrl; - public static ViewerPageFragment newInstance(String url, int position) { - ViewerPageFragment newInstance = new ViewerPageFragment(); + public static ReaderPageFragment newInstance(String url, int position) { + ReaderPageFragment newInstance = new ReaderPageFragment(); Bundle arguments = new Bundle(); arguments.putString(URL_ARGUMENT_KEY, url); newInstance.setArguments(arguments);