Some cleaning

pull/254/head
Thomas 2 years ago
parent 4a2eff9236
commit 65d0bd8f47

@ -38,7 +38,6 @@ import java.util.List;
import es.dmoral.toasty.Toasty;
public class MainApplication extends MultiDexApplication {

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

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

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

@ -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<String> 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<String> idOfAddedStatuses;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {

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

Loading…
Cancel
Save