diff --git a/app/src/main/java/app/fedilab/android/MainApplication.java b/app/src/main/java/app/fedilab/android/MainApplication.java index 3de73cd4d..a2d40e7d0 100644 --- a/app/src/main/java/app/fedilab/android/MainApplication.java +++ b/app/src/main/java/app/fedilab/android/MainApplication.java @@ -38,7 +38,6 @@ import java.util.List; import es.dmoral.toasty.Toasty; - public class MainApplication extends MultiDexApplication { diff --git a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java index 487d43de4..f09369dc5 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java @@ -98,16 +98,6 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana private Status statusReply, statusMention; private StatusDraft statusDraft; private ComposeAdapter composeAdapter; - private ActivityPaginationBinding binding; - private Account account; - private String instance, token; - private Uri photoFileUri; - private ScheduledStatus scheduledStatus; - private String visibility; - private app.fedilab.android.client.entities.api.Account accountMention; - private String statusReplyId; - private app.fedilab.android.client.entities.api.Account mentionBooster; - private final BroadcastReceiver imageReceiver = new BroadcastReceiver() { @Override public void onReceive(android.content.Context context, Intent intent) { @@ -128,6 +118,15 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } } }; + private ActivityPaginationBinding binding; + private Account account; + private String instance, token; + private Uri photoFileUri; + private ScheduledStatus scheduledStatus; + private String visibility; + private app.fedilab.android.client.entities.api.Account accountMention; + private String statusReplyId; + private app.fedilab.android.client.entities.api.Account mentionBooster; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java b/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java index 407cfb5a8..b7f33b539 100644 --- a/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java @@ -415,33 +415,6 @@ public class MastodonHelper { alertDialogBoost.show(); } - public enum MediaAccountType { - AVATAR, - HEADER - } - - public enum visibility { - @SerializedName("PUBLIC") - PUBLIC("public"), - @SerializedName("UNLISTED") - UNLISTED("unlisted"), - @SerializedName("PRIVATE") - PRIVATE("private"), - @SerializedName("DIRECT") - DIRECT("direct"); - - private final String value; - - visibility(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - } - - /** * Insert a single message depending of its publication date * @@ -480,6 +453,33 @@ public class MastodonHelper { adapter.notifyItemRangeInserted(i, statusesToInsert.size()); } + + public enum MediaAccountType { + AVATAR, + HEADER + } + + public enum visibility { + @SerializedName("PUBLIC") + PUBLIC("public"), + @SerializedName("UNLISTED") + UNLISTED("unlisted"), + @SerializedName("PRIVATE") + PRIVATE("private"), + @SerializedName("DIRECT") + DIRECT("direct"); + + private final String value; + + visibility(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + } + public enum ScheduleType { BOOST, TIMED_MUTED diff --git a/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java b/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java index 034417cea..a9c68c7a5 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java +++ b/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java @@ -63,6 +63,7 @@ public class EditImageActivity extends BaseActivity implements OnPhotoEditorList private final FilterViewAdapter mFilterViewAdapter = new FilterViewAdapter(this); private final ConstraintSet mConstraintSet = new ConstraintSet(); PhotoEditor mPhotoEditor; + String path; private PropertiesBSFragment mPropertiesBSFragment; private ShapeBSFragment mShapeBSFragment; private ShapeBuilder mShapeBuilder; @@ -70,6 +71,7 @@ public class EditImageActivity extends BaseActivity implements OnPhotoEditorList private boolean mIsFilterVisible; private Uri uri; private boolean exit; + private ActivityEditImageBinding binding; private static int exifToDegrees(int exifOrientation) { if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_90) { @@ -82,9 +84,6 @@ public class EditImageActivity extends BaseActivity implements OnPhotoEditorList return 0; } - String path; - private ActivityEditImageBinding binding; - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java index e263f3d34..6da903954 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java @@ -65,6 +65,8 @@ import app.fedilab.android.viewmodel.mastodon.TimelinesVM; public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.FetchMoreCallBack { + private static final int STATUS_PRESENT = -1; + private static final int STATUS_AT_THE_BOTTOM = -2; private FragmentPaginationBinding binding; private TimelinesVM timelinesVM; private AccountsVM accountsVM; @@ -75,7 +77,6 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. private String max_id, min_id, min_id_fetch_more; private StatusAdapter statusAdapter; private Timeline.TimeLineEnum timelineType; - private static final int STATUS_PRESENT = -1; //Handle actions that can be done in other fragments private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override @@ -137,6 +138,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. private String viewModelKey, remoteInstance; private String ident; private String instance, user_id; + private ArrayList idOfAddedStatuses; /** * Return the position of the status in the ArrayList @@ -157,8 +159,6 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. return found ? position : -1; } - - /** * Returned list of checked status id for reports * @@ -180,15 +180,11 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } } - private static final int STATUS_AT_THE_BOTTOM = -2; - @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); } - private ArrayList idOfAddedStatuses; - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java index c0452b6cb..a929a8c3f 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java @@ -39,9 +39,9 @@ public class FedilabPageAdapter extends FragmentStatePagerAdapter { public static final int BOTTOM_TIMELINE_COUNT = 5; //home, local, public, notification, DM private final Pinned pinned; private final BottomMenu bottomMenu; - private Fragment mCurrentFragment; private final Context context; private final int toRemove; + private Fragment mCurrentFragment; public FedilabPageAdapter(Context context, FragmentManager fm, Pinned pinned, BottomMenu bottomMenu) { super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);