From e7d7d88bef226067ee13204e21afd0f44385081b Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 3 Sep 2018 19:08:50 +0000 Subject: [PATCH] Small improvements --- .../java/eu/faircode/email/FragmentFolders.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentFolders.java b/app/src/main/java/eu/faircode/email/FragmentFolders.java index a1bf19d739..e4bd4489b7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentFolders.java +++ b/app/src/main/java/eu/faircode/email/FragmentFolders.java @@ -43,8 +43,18 @@ public class FragmentFolders extends FragmentEx { private Group grpReady; private FloatingActionButton fab; + private long account; private AdapterFolder adapter; + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Get arguments + Bundle args = getArguments(); + account = (args == null ? -1 : args.getLong("account")); + } + @Override @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -89,10 +99,6 @@ public class FragmentFolders extends FragmentEx { public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - // Get arguments - Bundle args = getArguments(); - long account = (args == null ? -1 : args.getLong("account")); - DB db = DB.getInstance(getContext()); // Observe account