Przeglądaj źródła

fix shared view (#4373)

fix shared view
Tobias Kaminsky 5 lat temu
rodzic
commit
656628ce3c

+ 14 - 4
src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

@@ -446,8 +446,10 @@ public abstract class DrawerActivity extends ToolbarActivity
 
                 break;
             case R.id.nav_favorites:
-                handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.FAVORITE_SEARCH,
-                        SearchEvent.UnsetType.NO_UNSET), menuItem.getItemId());
+                handleSearchEvents(new SearchEvent("",
+                                                   SearchRemoteOperation.SearchType.FAVORITE_SEARCH,
+                                                   SearchEvent.UnsetType.NO_UNSET),
+                                   menuItem.getItemId());
                 break;
             case R.id.nav_photos:
                 startPhotoSearch(menuItem);
@@ -496,9 +498,17 @@ public abstract class DrawerActivity extends ToolbarActivity
                 menuItem.setChecked(false);
                 UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getSupportFragmentManager(), true);
                 break;
+            case R.id.nav_shared:
+                handleSearchEvents(new SearchEvent("",
+                                                   SearchRemoteOperation.SearchType.SHARED_SEARCH,
+                                                   SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR),
+                                   menuItem.getItemId());
+                break;
             case R.id.nav_recently_modified:
-                handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.RECENTLY_MODIFIED_SEARCH,
-                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR), menuItem.getItemId());
+                handleSearchEvents(new SearchEvent("",
+                                                   SearchRemoteOperation.SearchType.RECENTLY_MODIFIED_SEARCH,
+                                                   SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR),
+                                   menuItem.getItemId());
                 break;
             default:
                 if (menuItem.getItemId() >= MENU_ITEM_EXTERNAL_LINK &&

+ 1 - 1
src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -134,7 +134,7 @@ public class ExtendedListFragment extends Fragment implements
     private EmptyRecyclerView mRecyclerView;
 
     protected SearchView searchView;
-    private Handler handler = new Handler();
+    private Handler handler = new Handler(Looper.getMainLooper());
 
     private float mScale = -1f;