mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-28 23:03:13 -05:00
Rename viewer to reader
This commit is contained in:
parent
5142df103b
commit
915847c0ed
7 changed files with 22 additions and 22 deletions
|
@ -38,7 +38,7 @@
|
|||
android:value="eu.kanade.mangafeed.ui.activity.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activity.ViewerActivity"
|
||||
android:name=".ui.activity.ReaderActivity"
|
||||
android:label="@string/title_activity_viewer"
|
||||
android:parentActivityName=".ui.activity.MangaDetailActivity"
|
||||
android:theme="@style/AppTheme" >
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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<ViewerActivity> {
|
||||
public class ReaderPresenter extends BasePresenter<ReaderActivity> {
|
||||
|
||||
private static final int GET_PAGE_LIST = 1;
|
||||
private Source source;
|
||||
|
@ -38,7 +38,7 @@ public class ViewerPresenter extends BasePresenter<ViewerActivity> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void onTakeView(ViewerActivity view) {
|
||||
protected void onTakeView(ReaderActivity view) {
|
||||
super.onTakeView(view);
|
||||
registerForStickyEvents();
|
||||
}
|
|
@ -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<ViewerPresenter> {
|
||||
@RequiresPresenter(ReaderPresenter.class)
|
||||
public class ReaderActivity extends BaseActivity<ReaderPresenter> {
|
||||
|
||||
@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<ViewerPresenter> {
|
|||
}
|
||||
|
||||
private void createAdapter() {
|
||||
adapter = new ViewerPageAdapter(getSupportFragmentManager());
|
||||
adapter = new ReaderPageAdapter(getSupportFragmentManager());
|
||||
viewPager.setAdapter(adapter);
|
||||
}
|
||||
|
|
@ -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<String> 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<String> getImageUrls() {
|
|
@ -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<MangaChaptersPresenter>
|
|||
private void createAdapter() {
|
||||
ChapterListHolder.ChapterListener listener = chapter -> {
|
||||
getPresenter().onChapterClicked(chapter);
|
||||
Intent intent = ViewerActivity.newInstance(getActivity());
|
||||
Intent intent = ReaderActivity.newInstance(getActivity());
|
||||
startActivity(intent);
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
Loading…
Reference in a new issue