mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Revert "Remove uploads menu"
This reverts commit 92204c4367ef4e69e814c54c601a35b9d7c2a880. Signed-off-by: Mario Danic <mario@lovelyhq.com> # Conflicts: # src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java
This commit is contained in:
parent
853d0bf197
commit
2092a010b1
2 changed files with 48 additions and 0 deletions
|
@ -34,6 +34,8 @@ import android.os.Bundle;
|
|||
import android.os.IBinder;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
@ -208,6 +210,18 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
|
|||
openDrawer();
|
||||
}
|
||||
|
||||
case R.id.action_clear_successfull_uploads:
|
||||
storageManager = new UploadsStorageManager(getContentResolver(), getApplicationContext());
|
||||
storageManager.clearSuccessfulUploads();
|
||||
uploadListFragment.updateUploads();
|
||||
break;
|
||||
|
||||
case R.id.action_clear_finished_uploads:
|
||||
storageManager = new UploadsStorageManager(getContentResolver(), getApplicationContext());
|
||||
storageManager.clearAllFinishedButNotDelayedUploads();
|
||||
uploadListFragment.updateUploads();
|
||||
break;
|
||||
|
||||
default:
|
||||
retval = super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -215,6 +229,13 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
|
|||
return retval;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.upload_list_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
|
27
src/main/res/menu/upload_list_menu.xml
Executable file
27
src/main/res/menu/upload_list_menu.xml
Executable file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2012-2013 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:id="@+id/action_clear_successfull_uploads"
|
||||
android:title="@string/action_clear_successful_uploads"/>
|
||||
<item
|
||||
android:id="@+id/action_clear_finished_uploads"
|
||||
android:title="@string/action_clear_finished_uploads"/>
|
||||
</menu>
|
Loading…
Reference in a new issue