From 29653cade296379d135cf0a68b6fd100cd6e5bca Mon Sep 17 00:00:00 2001 From: opyale Date: Tue, 9 Feb 2021 13:51:13 +0100 Subject: [PATCH] Calling overloaded method first. (#823) Calling overloaded method first. Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/823 Reviewed-by: M M Arif Co-Authored-By: opyale Co-Committed-By: opyale --- .../fragments/BottomSheetNotificationsFilterFragment.java | 3 ++- .../gitnex/fragments/BottomSheetNotificationsFragment.java | 2 ++ .../org/mian/gitnex/fragments/BottomSheetReplyFragment.java | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFilterFragment.java b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFilterFragment.java index e1279f8b..a59d2a6a 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFilterFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFilterFragment.java @@ -23,9 +23,10 @@ public class BottomSheetNotificationsFilterFragment extends BottomSheetDialogFra @Override public void onAttach(@NonNull Context context) { - this.tinyDB = TinyDB.getInstance(context); super.onAttach(context); + this.tinyDB = TinyDB.getInstance(context); + } @Nullable diff --git a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFragment.java b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFragment.java index 4e606a8b..3ed9d5b2 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetNotificationsFragment.java @@ -30,6 +30,8 @@ public class BottomSheetNotificationsFragment extends BottomSheetDialogFragment public void onAttach(Context context, NotificationThread notificationThread, OnOptionSelectedListener onOptionSelectedListener) { + super.onAttach(context); + this.context = context; this.notificationThread = notificationThread; this.onOptionSelectedListener = onOptionSelectedListener; diff --git a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetReplyFragment.java b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetReplyFragment.java index d5b486e0..a138c8c9 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/BottomSheetReplyFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/BottomSheetReplyFragment.java @@ -53,6 +53,8 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment { @Override public void onAttach(@NonNull Context context) { + super.onAttach(context); + tinyDB = TinyDB.getInstance(context); draftsApi = new DraftsApi(context); @@ -60,7 +62,6 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment { currentActiveAccountId = tinyDB.getInt("currentActiveAccountId"); issueNumber = Integer.parseInt(tinyDB.getString("issueNumber")); - super.onAttach(context); } @SuppressLint("ClickableViewAccessibility") @@ -119,7 +120,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment { comment.requestFocus(); comment.setOnTouchListener((v, event) -> { - BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetReplyLayoutBinding.getRoot().getParent()); + BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetReplyLayoutBinding.getRoot().getParent()); switch(event.getAction()) {