mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
remove shrug
This commit is contained in:
parent
5fa8ab2f31
commit
be19827804
@ -16,6 +16,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.evernote.android.state.StateSaver;
|
||||
import com.fastaccess.App;
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.helper.AnimHelper;
|
||||
import com.fastaccess.helper.AppHelper;
|
||||
@ -26,6 +27,8 @@ import com.fastaccess.ui.widgets.dialog.ProgressDialogFragment;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiDialogFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@ -44,7 +47,7 @@ public abstract class BaseDialogFragment<V extends BaseMvp.FAView, P extends Bas
|
||||
|
||||
protected abstract void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState);
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof BaseMvp.FAView) {
|
||||
callback = (BaseMvp.FAView) context;
|
||||
@ -93,7 +96,7 @@ public abstract class BaseDialogFragment<V extends BaseMvp.FAView, P extends Bas
|
||||
@SuppressLint("RestrictedApi") @Nullable @Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
if (fragmentLayout() != 0) {
|
||||
final Context contextThemeWrapper = new ContextThemeWrapper(getContext(), getContext().getTheme());
|
||||
final Context contextThemeWrapper = new ContextThemeWrapper(getContext(), requireContext().getTheme());
|
||||
LayoutInflater themeAwareInflater = inflater.cloneInContext(contextThemeWrapper);
|
||||
View view = themeAwareInflater.inflate(fragmentLayout(), container, false);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
@ -106,12 +109,12 @@ public abstract class BaseDialogFragment<V extends BaseMvp.FAView, P extends Bas
|
||||
final Dialog dialog = super.onCreateDialog(savedInstanceState);
|
||||
if (!PrefGetter.isAppAnimationDisabled() && !(this instanceof ProgressDialogFragment) && !suppressAnimation) {
|
||||
dialog.setOnShowListener(dialogInterface -> AnimHelper.revealDialog(dialog,
|
||||
getResources().getInteger(android.R.integer.config_longAnimTime)));
|
||||
App.getInstance().getResources().getInteger(android.R.integer.config_longAnimTime)));
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
@Override public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
onFragmentCreated(view, savedInstanceState);
|
||||
}
|
||||
|
||||
@ -19,6 +19,8 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.ui.base.BaseDialogFragment;
|
||||
import com.fastaccess.ui.widgets.FontButton;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import butterknife.BindView;
|
||||
@ -48,7 +50,7 @@ public class EditorLinkImageDialogFragment extends BaseDialogFragment<EditorLink
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() instanceof EditorLinkImageMvp.EditorLinkCallback) {
|
||||
callback = (EditorLinkImageMvp.EditorLinkCallback) getParentFragment();
|
||||
|
||||
@ -22,6 +22,8 @@ import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
@ -57,7 +59,7 @@ public class AssigneesDialogFragment extends BaseDialogFragment<AssigneesMvp.Vie
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() instanceof AssigneesMvp.SelectedAssigneesListener) {
|
||||
callback = (AssigneesMvp.SelectedAssigneesListener) getParentFragment();
|
||||
|
||||
@ -24,6 +24,8 @@ import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -66,7 +68,7 @@ public class LabelsDialogFragment extends BaseDialogFragment<LabelsMvp.View, Lab
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() instanceof LabelsMvp.SelectedLabelsListener) {
|
||||
callback = (LabelsMvp.SelectedLabelsListener) getParentFragment();
|
||||
|
||||
@ -19,6 +19,8 @@ import com.fastaccess.ui.modules.repos.extras.labels.LabelsMvp;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import butterknife.BindView;
|
||||
@ -45,7 +47,7 @@ public class CreateLabelDialogFragment extends BaseDialogFragment<CreateLabelMvp
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() instanceof LabelsMvp.View) {
|
||||
callback = (LabelsMvp.View) getParentFragment();
|
||||
|
||||
@ -20,6 +20,8 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.helper.ParseDateFormat;
|
||||
import com.fastaccess.ui.base.BaseDialogFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnTouch;
|
||||
|
||||
@ -48,7 +50,7 @@ public class CreateMilestoneDialogFragment extends BaseDialogFragment<CreateMile
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() instanceof CreateMilestoneMvp.OnMilestoneAdded) {
|
||||
onMilestoneAdded = (CreateMilestoneMvp.OnMilestoneAdded) getParentFragment();
|
||||
|
||||
@ -18,6 +18,8 @@ import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRe
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 04 Mar 2017, 10:58 PM
|
||||
*/
|
||||
@ -37,7 +39,7 @@ public class MilestoneDialogFragment extends BaseDialogFragment implements Miles
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof IssuePagerMvp.View) {
|
||||
issueCallback = (IssuePagerMvp.View) context;
|
||||
|
||||
@ -16,6 +16,8 @@ import com.fastaccess.helper.PrefGetter;
|
||||
import com.fastaccess.ui.base.BaseDialogFragment;
|
||||
import com.fastaccess.ui.modules.main.premium.PremiumActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnItemSelected;
|
||||
@ -40,7 +42,7 @@ public class MergePullRequestDialogFragment extends BaseDialogFragment<MergePull
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof MergePullReqeustMvp.MergeCallback) {
|
||||
mergeCallback = (MergePullReqeustMvp.MergeCallback) context;
|
||||
|
||||
@ -95,7 +95,7 @@ public class StateLayout extends NestedScrollView {
|
||||
}
|
||||
|
||||
public void setEmptyText(@NonNull String text) {
|
||||
this.emptyTextValue = text + "\n\n¯\\_(ツ)_/¯";
|
||||
this.emptyTextValue = text;
|
||||
emptyText.setText(emptyTextValue);
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@ import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -61,7 +63,7 @@ public class ListDialogView<O extends Parcelable> extends BaseDialogFragment imp
|
||||
fastScroller.attachRecyclerView(recycler);
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@Override public void onAttach(@NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getParentFragment() != null && getParentFragment() instanceof onSimpleItemSelection) {
|
||||
onSimpleItemSelection = (onSimpleItemSelection) getParentFragment();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user