Calling overloaded method first. (#823)

Calling overloaded method first.

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/823
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-Authored-By: opyale <opyale@noreply.codeberg.org>
Co-Committed-By: opyale <opyale@noreply.codeberg.org>
This commit is contained in:
opyale 2021-02-09 13:51:13 +01:00 committed by M M Arif
parent d72cd57cd7
commit 29653cade2
3 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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<View> bottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetReplyLayoutBinding.getRoot().getParent());
switch(event.getAction()) {