Added folder create, rename, delete

Fixes #71
This commit is contained in:
M66B
2018-09-14 08:15:45 +00:00
parent d7e38c0f56
commit fc98eba42b
6 changed files with 212 additions and 28 deletions

View File

@@ -19,7 +19,6 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
@@ -36,6 +35,7 @@ import java.util.List;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -94,13 +94,13 @@ public class FragmentFolders extends FragmentEx {
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Bundle args = getArguments();
long account = (args == null ? -1 : args.getLong("account"));
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "new")
.putExtra("account", account)
);
Bundle args = new Bundle();
args.putLong("account", account);
FragmentFolder fragment = new FragmentFolder();
fragment.setArguments(args);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("folder");
fragmentTransaction.commit();
}
});