mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix #52
This commit is contained in:
parent
6c844cfd9c
commit
5c854984e4
2 changed files with 6 additions and 2 deletions
|
@ -73,6 +73,7 @@ public class CatalogueFragment extends BaseRxFragment<CataloguePresenter>
|
|||
private Subscription queryDebouncerSubscription;
|
||||
|
||||
private MenuItem displayMode;
|
||||
private MenuItem searchItem;
|
||||
|
||||
public static CatalogueFragment newInstance() {
|
||||
return new CatalogueFragment();
|
||||
|
@ -164,7 +165,7 @@ public class CatalogueFragment extends BaseRxFragment<CataloguePresenter>
|
|||
inflater.inflate(R.menu.catalogue_list, menu);
|
||||
|
||||
// Initialize search menu
|
||||
MenuItem searchItem = menu.findItem(R.id.action_search);
|
||||
searchItem = menu.findItem(R.id.action_search);
|
||||
final SearchView searchView = (SearchView) searchItem.getActionView();
|
||||
|
||||
if (!TextUtils.isEmpty(query)) {
|
||||
|
@ -217,6 +218,9 @@ public class CatalogueFragment extends BaseRxFragment<CataloguePresenter>
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
if (searchItem != null && searchItem.isActionViewExpanded()) {
|
||||
searchItem.collapseActionView();
|
||||
}
|
||||
toolbar.removeView(spinner);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class MangaInfoPresenter extends BasePresenter<MangaInfoFragment> {
|
|||
})
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnCompleted(this::refreshManga);
|
||||
.doOnNext(manga -> refreshManga());
|
||||
}
|
||||
|
||||
public void toggleFavorite() {
|
||||
|
|
Loading…
Reference in a new issue