diff --git a/app/src/main/java/app/fedilab/android/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/BaseMainActivity.java index bc18fb89..ed528220 100644 --- a/app/src/main/java/app/fedilab/android/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/BaseMainActivity.java @@ -95,14 +95,14 @@ import app.fedilab.android.activities.ScheduledActivity; import app.fedilab.android.activities.SearchResultTabActivity; import app.fedilab.android.activities.SettingsActivity; import app.fedilab.android.broadcastreceiver.NetworkStateReceiver; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.BottomMenu; -import app.fedilab.android.client.entities.Pinned; +import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.client.entities.api.Instance; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.BottomMenu; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; -import app.fedilab.android.client.mastodon.entities.Filter; -import app.fedilab.android.client.mastodon.entities.Instance; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.Status; import app.fedilab.android.databinding.ActivityMainBinding; import app.fedilab.android.databinding.NavHeaderMainBinding; import app.fedilab.android.exception.DBException; @@ -129,13 +129,13 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt public static Instance instanceInfo; public static List mainFilters; public static boolean filterFetched; + public static boolean show_boosts, show_replies, show_art_nsfw; + public static String regex_home, regex_local, regex_public; Fragment currentFragment; private Account account; private AppBarConfiguration mAppBarConfiguration; private ActivityMainBinding binding; private Pinned pinned; - public static boolean show_boosts, show_replies, show_art_nsfw; - public static String regex_home, regex_local, regex_public; private BottomMenu bottomMenu; private final BroadcastReceiver broadcast_data = new BroadcastReceiver() { @@ -302,8 +302,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt binding.navView.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this, R.color.cyanea_primary))); - - // Passing each menu ID as a set of Ids because each // menu should be considered as top level destinations. mAppBarConfiguration = new AppBarConfiguration.Builder() diff --git a/app/src/main/java/app/fedilab/android/activities/ActionActivity.java b/app/src/main/java/app/fedilab/android/activities/ActionActivity.java index 12c0db8f..7ff2e7b4 100644 --- a/app/src/main/java/app/fedilab/android/activities/ActionActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ActionActivity.java @@ -24,7 +24,7 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityActionsBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; 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 b2318a02..4f93efcd 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java @@ -58,12 +58,12 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.entities.Context; -import app.fedilab.android.client.mastodon.entities.Mention; -import app.fedilab.android.client.mastodon.entities.ScheduledStatus; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Context; +import app.fedilab.android.client.entities.api.Mention; +import app.fedilab.android.client.entities.api.ScheduledStatus; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.ActivityPaginationBinding; import app.fedilab.android.databinding.PopupContactBinding; import app.fedilab.android.exception.DBException; @@ -100,8 +100,9 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana private Uri photoFileUri; private ScheduledStatus scheduledStatus; private String visibility; - private app.fedilab.android.client.mastodon.entities.Account accountMention; + private app.fedilab.android.client.entities.api.Account accountMention; private String statusReplyId; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -131,7 +132,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana instance = b.getString(Helper.ARG_INSTANCE, BaseMainActivity.currentInstance); token = b.getString(Helper.ARG_TOKEN, BaseMainActivity.currentToken); visibility = b.getString(Helper.ARG_VISIBILITY, null); - accountMention = (app.fedilab.android.client.mastodon.entities.Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION); + accountMention = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION); } binding.toolbar.setPopupTheme(Helper.popupStyle()); //Edit a scheduled status from server @@ -449,14 +450,14 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } - private void onRetrieveContact(PopupContactBinding binding, List accounts) { + private void onRetrieveContact(PopupContactBinding binding, List accounts) { binding.loader.setVisibility(View.GONE); if (accounts == null) { accounts = new ArrayList<>(); } List checkedValues = new ArrayList<>(); - List contacts = new ArrayList<>(accounts); - for (app.fedilab.android.client.mastodon.entities.Account account : contacts) { + List contacts = new ArrayList<>(accounts); + for (app.fedilab.android.client.entities.api.Account account : contacts) { checkedValues.add(composeAdapter.getLastComposeContent().contains("@" + account.acct)); } AccountsReplyAdapter contactAdapter = new AccountsReplyAdapter(contacts, checkedValues); diff --git a/app/src/main/java/app/fedilab/android/activities/ContextActivity.java b/app/src/main/java/app/fedilab/android/activities/ContextActivity.java index 307d669a..ba8910a7 100644 --- a/app/src/main/java/app/fedilab/android/activities/ContextActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ContextActivity.java @@ -32,7 +32,7 @@ import androidx.preference.PreferenceManager; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityConversationBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java b/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java index 8a832a4b..de2fcf3c 100644 --- a/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java @@ -32,10 +32,10 @@ import java.util.Set; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Emoji; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Emoji; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.ActivityCustomSharingBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/DraftActivity.java b/app/src/main/java/app/fedilab/android/activities/DraftActivity.java index e6ceff39..fe24fdb1 100644 --- a/app/src/main/java/app/fedilab/android/activities/DraftActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/DraftActivity.java @@ -36,9 +36,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.ActivityDraftsBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java index 1fc73345..153afc45 100644 --- a/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java @@ -42,8 +42,8 @@ import java.util.Locale; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Field; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Field; import app.fedilab.android.databinding.AccountFieldItemBinding; import app.fedilab.android.databinding.ActivityEditProfileBinding; import app.fedilab.android.exception.DBException; @@ -193,7 +193,7 @@ public class EditProfileActivity extends BaseActivity { Helper.recreateMainActivity(EditProfileActivity.this); new Thread(() -> { try { - new app.fedilab.android.client.entities.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); + new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); } catch (DBException e) { e.printStackTrace(); } @@ -213,7 +213,7 @@ public class EditProfileActivity extends BaseActivity { BaseMainActivity.accountWeakReference.get().mastodon_account = account; new Thread(() -> { try { - new app.fedilab.android.client.entities.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); + new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); } catch (DBException e) { e.printStackTrace(); } @@ -304,7 +304,7 @@ public class EditProfileActivity extends BaseActivity { BaseMainActivity.accountWeakReference.get().mastodon_account = account; new Thread(() -> { try { - new app.fedilab.android.client.entities.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); + new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(BaseMainActivity.accountWeakReference.get()); sendBroadCast(account); } catch (DBException e) { e.printStackTrace(); diff --git a/app/src/main/java/app/fedilab/android/activities/FilterActivity.java b/app/src/main/java/app/fedilab/android/activities/FilterActivity.java index d45272bb..9f6d29b3 100644 --- a/app/src/main/java/app/fedilab/android/activities/FilterActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/FilterActivity.java @@ -40,7 +40,7 @@ import java.util.Objects; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Filter; +import app.fedilab.android.client.entities.api.Filter; import app.fedilab.android.databinding.ActivityFiltersBinding; import app.fedilab.android.databinding.PopupAddFilterBinding; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java b/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java index f05e5865..c75af410 100644 --- a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java @@ -33,12 +33,12 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.client.entities.app.TagTimeline; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityHashtagBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java b/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java index 3e23b5a6..eeea8b6a 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java @@ -31,7 +31,7 @@ import com.bumptech.glide.Glide; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Instance; +import app.fedilab.android.client.entities.api.Instance; import app.fedilab.android.databinding.ActivityInstanceBinding; import app.fedilab.android.helper.ThemeHelper; import app.fedilab.android.viewmodel.mastodon.InstancesVM; diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.java b/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.java index ad49bba4..f4a44a25 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.java @@ -31,7 +31,7 @@ import com.bumptech.glide.Glide; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.InstanceSocial; +import app.fedilab.android.client.entities.app.InstanceSocial; import app.fedilab.android.databinding.ActivityInstanceSocialBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java index 1664f811..20c92bba 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java @@ -36,7 +36,7 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.ActivityInstanceProfileBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/LoginActivity.java b/app/src/main/java/app/fedilab/android/activities/LoginActivity.java index f234ce80..15a4b12e 100644 --- a/app/src/main/java/app/fedilab/android/activities/LoginActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/LoginActivity.java @@ -43,8 +43,8 @@ import java.util.regex.Matcher; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.WellKnownNodeinfo; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.WellKnownNodeinfo; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; @@ -160,17 +160,17 @@ public class LoginActivity extends BaseActivity { // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); - if (id == R.id.action_proxy) { - Intent intent = new Intent(LoginActivity.this, ProxyActivity.class); - startActivity(intent); - } else if (id == R.id.action_custom_tabs) { - item.setChecked(!item.isChecked()); - SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); - SharedPreferences.Editor editor = sharedpreferences.edit(); - editor.putBoolean(getString(R.string.SET_EMBEDDED_BROWSER), !item.isChecked()); - editor.apply(); - return false; - } + if (id == R.id.action_proxy) { + Intent intent = new Intent(LoginActivity.this, ProxyActivity.class); + startActivity(intent); + } else if (id == R.id.action_custom_tabs) { + item.setChecked(!item.isChecked()); + SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); + SharedPreferences.Editor editor = sharedpreferences.edit(); + editor.putBoolean(getString(R.string.SET_EMBEDDED_BROWSER), !item.isChecked()); + editor.apply(); + return false; + } return super.onOptionsItemSelected(item); } diff --git a/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java b/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java index d3ef6eae..890db373 100644 --- a/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java @@ -41,9 +41,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.MastodonList; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityListBinding; import app.fedilab.android.databinding.PopupAddListBinding; import app.fedilab.android.databinding.PopupManageAccountsListBinding; diff --git a/app/src/main/java/app/fedilab/android/activities/MediaActivity.java b/app/src/main/java/app/fedilab/android/activities/MediaActivity.java index 104ce803..e7cb41b7 100644 --- a/app/src/main/java/app/fedilab/android/activities/MediaActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/MediaActivity.java @@ -53,7 +53,7 @@ import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Attachment; +import app.fedilab.android.client.entities.api.Attachment; import app.fedilab.android.databinding.ActivityMediaPagerBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MediaHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java index a7da021d..df4730f8 100644 --- a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java @@ -74,17 +74,17 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.entities.WellKnownNodeinfo; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Field; +import app.fedilab.android.client.entities.api.IdentityProof; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; import app.fedilab.android.client.entities.app.RemoteInstance; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Field; -import app.fedilab.android.client.mastodon.entities.IdentityProof; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.RelationShip; +import app.fedilab.android.client.entities.app.Timeline; +import app.fedilab.android.client.entities.app.WellKnownNodeinfo; import app.fedilab.android.databinding.ActivityProfileBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.CrossActionHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java b/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java index e5466ff2..cde71cdf 100644 --- a/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java @@ -48,12 +48,12 @@ import java.util.ArrayList; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -import app.fedilab.android.client.entities.BottomMenu; -import app.fedilab.android.client.entities.InstanceSocial; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.BottomMenu; +import app.fedilab.android.client.entities.app.InstanceSocial; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; import app.fedilab.android.client.entities.app.RemoteInstance; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityReorderTabsBinding; import app.fedilab.android.databinding.PopupSearchInstanceBinding; import app.fedilab.android.exception.DBException; diff --git a/app/src/main/java/app/fedilab/android/activities/ReportActivity.java b/app/src/main/java/app/fedilab/android/activities/ReportActivity.java index 0c3a1a4e..bff5392e 100644 --- a/app/src/main/java/app/fedilab/android/activities/ReportActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ReportActivity.java @@ -33,10 +33,10 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.RelationShip; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityReportBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java b/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java index d204a19b..9ccbcb54 100644 --- a/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java @@ -31,9 +31,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Accounts; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Accounts; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityStatusInfoBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/activities/WebviewConnectActivity.java b/app/src/main/java/app/fedilab/android/activities/WebviewConnectActivity.java index 829e2e20..e5d5863c 100644 --- a/app/src/main/java/app/fedilab/android/activities/WebviewConnectActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/WebviewConnectActivity.java @@ -53,7 +53,7 @@ import java.util.regex.Matcher; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Account; +import app.fedilab.android.client.entities.app.Account; import app.fedilab.android.databinding.ActivityWebviewConnectBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/client/NodeInfoService.java b/app/src/main/java/app/fedilab/android/client/NodeInfoService.java index fc54f220..4da1a61e 100644 --- a/app/src/main/java/app/fedilab/android/client/NodeInfoService.java +++ b/app/src/main/java/app/fedilab/android/client/NodeInfoService.java @@ -15,7 +15,7 @@ package app.fedilab.android.client; * see . */ -import app.fedilab.android.client.entities.WellKnownNodeinfo; +import app.fedilab.android.client.entities.app.WellKnownNodeinfo; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Path; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/JoinMastodonService.java b/app/src/main/java/app/fedilab/android/client/endpoints/JoinMastodonService.java similarity index 89% rename from app/src/main/java/app/fedilab/android/client/mastodon/JoinMastodonService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/JoinMastodonService.java index bbde5017..b251b74f 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/JoinMastodonService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/JoinMastodonService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.JoinMastodonInstance; +import app.fedilab.android.client.entities.api.JoinMastodonInstance; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAccountsService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAccountsService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonAccountsService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonAccountsService.java index cb5bbcbc..cfef921d 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAccountsService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAccountsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,17 +17,17 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.FeaturedTag; -import app.fedilab.android.client.mastodon.entities.Filter; -import app.fedilab.android.client.mastodon.entities.IdentityProof; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.Preferences; -import app.fedilab.android.client.mastodon.entities.RelationShip; -import app.fedilab.android.client.mastodon.entities.Report; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Tag; -import app.fedilab.android.client.mastodon.entities.Token; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.FeaturedTag; +import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.client.entities.api.IdentityProof; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.Preferences; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.api.Report; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Tag; +import app.fedilab.android.client.entities.api.Token; import okhttp3.MultipartBody; import retrofit2.Call; import retrofit2.http.Body; @@ -96,7 +96,7 @@ public interface MastodonAccountsService { @Field("source[privacy]") String privacy, @Field("source[sensitive]") Boolean sensitive, @Field("source[language]") String language, - @Field("fields_attributes") List fields + @Field("fields_attributes") List fields ); //Get Account diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAdminService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAdminService.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonAdminService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonAdminService.java index c82621ef..5cde16f6 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAdminService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAdminService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,8 +17,8 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.AdminAccount; -import app.fedilab.android.client.mastodon.entities.AdminReport; +import app.fedilab.android.client.entities.api.AdminAccount; +import app.fedilab.android.client.entities.api.AdminReport; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAnnouncementsService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonAnnouncementsService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java index bbe596e7..ac3dea56 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAnnouncementsService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Announcement; +import app.fedilab.android.client.entities.api.Announcement; import retrofit2.Call; import retrofit2.http.DELETE; import retrofit2.http.FormUrlEncoded; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAppsService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAppsService.java similarity index 92% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonAppsService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonAppsService.java index 784b7f45..d3e1636b 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonAppsService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAppsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,8 +15,8 @@ package app.fedilab.android.client.mastodon; * see . */ -import app.fedilab.android.client.mastodon.entities.App; -import app.fedilab.android.client.mastodon.entities.Token; +import app.fedilab.android.client.entities.api.App; +import app.fedilab.android.client.entities.api.Token; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonInstanceService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java similarity index 80% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonInstanceService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java index 4c8014e3..e87ed392 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonInstanceService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,11 +17,11 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Activity; -import app.fedilab.android.client.mastodon.entities.Emoji; -import app.fedilab.android.client.mastodon.entities.Instance; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Activity; +import app.fedilab.android.client.entities.api.Emoji; +import app.fedilab.android.client.entities.api.Instance; +import app.fedilab.android.client.entities.api.Tag; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonNotificationsService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonNotificationsService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonNotificationsService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonNotificationsService.java index c2ce0890..d6f2f15a 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonNotificationsService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonNotificationsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,8 +16,8 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.PushSubscription; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.PushSubscription; import retrofit2.Call; import retrofit2.http.DELETE; import retrofit2.http.Field; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonOembedService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonOembedService.java similarity index 90% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonOembedService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonOembedService.java index ff578ed3..53a51d2b 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonOembedService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonOembedService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.client.mastodon; * see . */ -import app.fedilab.android.client.mastodon.entities.Oembed; +import app.fedilab.android.client.entities.api.Oembed; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonSearchService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonSearchService.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonSearchService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonSearchService.java index 58531fd7..6c7768a8 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonSearchService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonSearchService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.client.mastodon; * see . */ -import app.fedilab.android.client.mastodon.entities.Results; +import app.fedilab.android.client.entities.api.Results; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Header; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonStatusesService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonStatusesService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java index e4903741..50f0a8fc 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonStatusesService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,13 +17,13 @@ package app.fedilab.android.client.mastodon; import java.util.Date; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Card; -import app.fedilab.android.client.mastodon.entities.Context; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.ScheduledStatus; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Card; +import app.fedilab.android.client.entities.api.Context; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.ScheduledStatus; +import app.fedilab.android.client.entities.api.Status; import okhttp3.MultipartBody; import retrofit2.Call; import retrofit2.http.DELETE; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonTimelinesService.java b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/MastodonTimelinesService.java rename to app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java index d381a376..01dfb83f 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/MastodonTimelinesService.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,11 +16,11 @@ package app.fedilab.android.client.mastodon; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Conversation; -import app.fedilab.android.client.mastodon.entities.Marker; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Conversation; +import app.fedilab.android.client.entities.api.Marker; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.Status; import retrofit2.Call; import retrofit2.http.DELETE; import retrofit2.http.Field; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/ProgressRequestBody.java b/app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/mastodon/ProgressRequestBody.java rename to app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java index 3205e2c7..c9f00d81 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/ProgressRequestBody.java +++ b/app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon; +package app.fedilab.android.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Account.java b/app/src/main/java/app/fedilab/android/client/entities/api/Account.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Account.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Account.java index bdc53004..9bd44785 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Account.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Account.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Accounts.java b/app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Accounts.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java index 73b5253e..80504450 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Accounts.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Activity.java b/app/src/main/java/app/fedilab/android/client/entities/api/Activity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Activity.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Activity.java index 3659f57a..4e64ce09 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Activity.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Activity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminAccount.java b/app/src/main/java/app/fedilab/android/client/entities/api/AdminAccount.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminAccount.java rename to app/src/main/java/app/fedilab/android/client/entities/api/AdminAccount.java index 1741fd34..2cfe93e3 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminAccount.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/AdminAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminReport.java b/app/src/main/java/app/fedilab/android/client/entities/api/AdminReport.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminReport.java rename to app/src/main/java/app/fedilab/android/client/entities/api/AdminReport.java index 5611ae5d..34502cc2 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/AdminReport.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/AdminReport.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Announcement.java b/app/src/main/java/app/fedilab/android/client/entities/api/Announcement.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Announcement.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Announcement.java index b7dffec6..e73ec120 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Announcement.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Announcement.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/App.java b/app/src/main/java/app/fedilab/android/client/entities/api/App.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/App.java rename to app/src/main/java/app/fedilab/android/client/entities/api/App.java index abf1a190..b6a611f7 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/App.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/App.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Attachment.java b/app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Attachment.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java index b07ee6f6..5f11e2e1 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Attachment.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Card.java b/app/src/main/java/app/fedilab/android/client/entities/api/Card.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Card.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Card.java index 4f69fa6f..049eb53a 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Card.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Card.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Context.java b/app/src/main/java/app/fedilab/android/client/entities/api/Context.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Context.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Context.java index 017961d1..269237cd 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Context.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Context.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversation.java b/app/src/main/java/app/fedilab/android/client/entities/api/Conversation.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversation.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Conversation.java index b155b4c5..7e70175b 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversation.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Conversation.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversations.java b/app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversations.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java index cc559b75..e7e54ab4 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Conversations.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Emoji.java b/app/src/main/java/app/fedilab/android/client/entities/api/Emoji.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Emoji.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Emoji.java index a059f0e0..1abe3a28 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Emoji.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Emoji.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/EmojiInstance.java b/app/src/main/java/app/fedilab/android/client/entities/api/EmojiInstance.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/EmojiInstance.java rename to app/src/main/java/app/fedilab/android/client/entities/api/EmojiInstance.java index dd3a587b..9338d09c 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/EmojiInstance.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/EmojiInstance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Error.java b/app/src/main/java/app/fedilab/android/client/entities/api/Error.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Error.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Error.java index bacdc0b7..a8b1d7dd 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Error.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Error.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/FeaturedTag.java b/app/src/main/java/app/fedilab/android/client/entities/api/FeaturedTag.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/FeaturedTag.java rename to app/src/main/java/app/fedilab/android/client/entities/api/FeaturedTag.java index f8e43418..ea57985c 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/FeaturedTag.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/FeaturedTag.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Field.java b/app/src/main/java/app/fedilab/android/client/entities/api/Field.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Field.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Field.java index a60be912..55754dc6 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Field.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Field.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Filter.java b/app/src/main/java/app/fedilab/android/client/entities/api/Filter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Filter.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Filter.java index 2a8894e5..7f507ed1 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Filter.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Filter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/History.java b/app/src/main/java/app/fedilab/android/client/entities/api/History.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/History.java rename to app/src/main/java/app/fedilab/android/client/entities/api/History.java index ff9d693a..321dafd3 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/History.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/History.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/IdentityProof.java b/app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/IdentityProof.java rename to app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java index 66c4d3be..0d87ca7e 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/IdentityProof.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Instance.java b/app/src/main/java/app/fedilab/android/client/entities/api/Instance.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Instance.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Instance.java index 58eb294c..5bde38a3 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Instance.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Instance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/InstanceInfo.java b/app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/InstanceInfo.java rename to app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java index f7eddcbf..c290c7e7 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/InstanceInfo.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/JoinMastodonInstance.java b/app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/JoinMastodonInstance.java rename to app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java index b6e59b28..e198b621 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/JoinMastodonInstance.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Marker.java b/app/src/main/java/app/fedilab/android/client/entities/api/Marker.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Marker.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Marker.java index 2b37e688..8b74fa49 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Marker.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Marker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/MastodonList.java b/app/src/main/java/app/fedilab/android/client/entities/api/MastodonList.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/MastodonList.java rename to app/src/main/java/app/fedilab/android/client/entities/api/MastodonList.java index 714a0e53..32cb8bd4 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/MastodonList.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/MastodonList.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Mention.java b/app/src/main/java/app/fedilab/android/client/entities/api/Mention.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Mention.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Mention.java index 714ee3d1..e4c07cf7 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Mention.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Mention.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Notification.java b/app/src/main/java/app/fedilab/android/client/entities/api/Notification.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Notification.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Notification.java index 0202a0d0..80469d1f 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Notification.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Notification.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Notifications.java b/app/src/main/java/app/fedilab/android/client/entities/api/Notifications.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Notifications.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Notifications.java index cd3b3ac8..31e1b5aa 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Notifications.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Notifications.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Oembed.java b/app/src/main/java/app/fedilab/android/client/entities/api/Oembed.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Oembed.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Oembed.java index 7d465ac7..a2d340ec 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Oembed.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Oembed.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Pagination.java b/app/src/main/java/app/fedilab/android/client/entities/api/Pagination.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Pagination.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Pagination.java index 30960b14..1b024270 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Pagination.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Pagination.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Poll.java b/app/src/main/java/app/fedilab/android/client/entities/api/Poll.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Poll.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Poll.java index a6caf859..a0d80fbe 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Poll.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Poll.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Preferences.java b/app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Preferences.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java index f8a2ceb7..62143630 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Preferences.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/PushSubscription.java b/app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/PushSubscription.java rename to app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java index 253c2255..c093b8be 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/PushSubscription.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Reaction.java b/app/src/main/java/app/fedilab/android/client/entities/api/Reaction.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Reaction.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Reaction.java index cee225c1..39635524 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Reaction.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Reaction.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/RelationShip.java b/app/src/main/java/app/fedilab/android/client/entities/api/RelationShip.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/RelationShip.java rename to app/src/main/java/app/fedilab/android/client/entities/api/RelationShip.java index 3d4f75dd..1849605b 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/RelationShip.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/RelationShip.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Report.java b/app/src/main/java/app/fedilab/android/client/entities/api/Report.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Report.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Report.java index 4b3c1180..81fbdb38 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Report.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Report.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Results.java b/app/src/main/java/app/fedilab/android/client/entities/api/Results.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Results.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Results.java index 37a85742..9e6b387e 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Results.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Results.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatus.java b/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatus.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatus.java rename to app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatus.java index 66a376ab..d7db4b8f 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatus.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatus.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatuses.java b/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatuses.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatuses.java rename to app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatuses.java index 052393ec..97d9f771 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/ScheduledStatuses.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatuses.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Source.java b/app/src/main/java/app/fedilab/android/client/entities/api/Source.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Source.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Source.java index 57469db5..63a53989 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Source.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Source.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Status.java b/app/src/main/java/app/fedilab/android/client/entities/api/Status.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Status.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Status.java index 199f0711..e4b11773 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Status.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Status.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Statuses.java b/app/src/main/java/app/fedilab/android/client/entities/api/Statuses.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Statuses.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Statuses.java index 0e9ebca5..b3b3f949 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Statuses.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Statuses.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Tag.java b/app/src/main/java/app/fedilab/android/client/entities/api/Tag.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Tag.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Tag.java index 6affdc79..eedf564f 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Tag.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Tag.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Token.java b/app/src/main/java/app/fedilab/android/client/entities/api/Token.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/mastodon/entities/Token.java rename to app/src/main/java/app/fedilab/android/client/entities/api/Token.java index 444d626a..a0357acf 100644 --- a/app/src/main/java/app/fedilab/android/client/mastodon/entities/Token.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Token.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.mastodon.entities; +package app.fedilab.android.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/Account.java b/app/src/main/java/app/fedilab/android/client/entities/app/Account.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/Account.java rename to app/src/main/java/app/fedilab/android/client/entities/app/Account.java index 47be0b1d..ab5dc900 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/Account.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/Account.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -64,7 +64,7 @@ public class Account implements Serializable { @SerializedName("updated_at") public Date updated_at; @SerializedName("mastodon_account") - public app.fedilab.android.client.mastodon.entities.Account mastodon_account; + public app.fedilab.android.client.entities.api.Account mastodon_account; private transient Context context; @@ -81,10 +81,10 @@ public class Account implements Serializable { /** * Serialized a Mastodon Account class * - * @param mastodon_account {@link app.fedilab.android.client.mastodon.entities.Account} to serialize + * @param mastodon_account {@link app.fedilab.android.client.entities.api.Account} to serialize * @return String serialized account */ - public static String mastodonAccountToStringStorage(app.fedilab.android.client.mastodon.entities.Account mastodon_account) { + public static String mastodonAccountToStringStorage(app.fedilab.android.client.entities.api.Account mastodon_account) { Gson gson = new Gson(); try { return gson.toJson(mastodon_account); @@ -97,12 +97,12 @@ public class Account implements Serializable { * Unserialized a Mastodon Account * * @param serializedAccount String serialized account - * @return {@link app.fedilab.android.client.mastodon.entities.Account} + * @return {@link app.fedilab.android.client.entities.api.Account} */ - public static app.fedilab.android.client.mastodon.entities.Account restoreAccountFromString(String serializedAccount) { + public static app.fedilab.android.client.entities.api.Account restoreAccountFromString(String serializedAccount) { Gson gson = new Gson(); try { - return gson.fromJson(serializedAccount, app.fedilab.android.client.mastodon.entities.Account.class); + return gson.fromJson(serializedAccount, app.fedilab.android.client.entities.api.Account.class); } catch (Exception e) { return null; } diff --git a/app/src/main/java/app/fedilab/android/client/entities/BottomMenu.java b/app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/BottomMenu.java rename to app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java index 1d849073..35695ed1 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/BottomMenu.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/InstanceSocial.java b/app/src/main/java/app/fedilab/android/client/entities/app/InstanceSocial.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/InstanceSocial.java rename to app/src/main/java/app/fedilab/android/client/entities/app/InstanceSocial.java index e879cc07..45083100 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/InstanceSocial.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/InstanceSocial.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/Pinned.java b/app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/Pinned.java rename to app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java index 3057956e..4b8a5673 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/Pinned.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,7 +29,6 @@ import java.util.Date; import java.util.List; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.app.PinnedTimeline; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java b/app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java index 210f9152..3bfa487b 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java @@ -18,8 +18,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.MastodonList; +import app.fedilab.android.client.entities.api.MastodonList; public class PinnedTimeline implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/PostState.java b/app/src/main/java/app/fedilab/android/client/entities/app/PostState.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/PostState.java rename to app/src/main/java/app/fedilab/android/client/entities/app/PostState.java index f78d26ee..1aff37b8 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/PostState.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/PostState.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/QuickLoad.java b/app/src/main/java/app/fedilab/android/client/entities/app/QuickLoad.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/QuickLoad.java rename to app/src/main/java/app/fedilab/android/client/entities/app/QuickLoad.java index 0dfdf2ca..c59ec7b8 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/QuickLoad.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/QuickLoad.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.SpannableHelper; diff --git a/app/src/main/java/app/fedilab/android/client/entities/ScheduledBoost.java b/app/src/main/java/app/fedilab/android/client/entities/app/ScheduledBoost.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/ScheduledBoost.java rename to app/src/main/java/app/fedilab/android/client/entities/app/ScheduledBoost.java index 0b825859..b0897375 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/ScheduledBoost.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/ScheduledBoost.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,8 +14,8 @@ package app.fedilab.android.client.entities; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.client.entities.StatusCache.mastodonStatusToStringStorage; -import static app.fedilab.android.client.entities.StatusCache.restoreStatusFromString; +import static app.fedilab.android.client.entities.app.StatusCache.mastodonStatusToStringStorage; +import static app.fedilab.android.client.entities.app.StatusCache.restoreStatusFromString; import android.content.ContentValues; import android.content.Context; @@ -32,7 +32,7 @@ import java.util.List; import java.util.UUID; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/StatusCache.java b/app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/StatusCache.java rename to app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java index 83cc135f..a89b6ce5 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/StatusCache.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -26,9 +26,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Statuses; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Statuses; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/client/entities/StatusDraft.java b/app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/StatusDraft.java rename to app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java index e5d2d0a1..1c93bbc9 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/StatusDraft.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -30,7 +30,7 @@ import java.util.List; import java.util.UUID; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/Timeline.java b/app/src/main/java/app/fedilab/android/client/entities/app/Timeline.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/Timeline.java rename to app/src/main/java/app/fedilab/android/client/entities/app/Timeline.java index dd40eff7..b8a4846c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/Timeline.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/Timeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/WellKnownNodeinfo.java b/app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/WellKnownNodeinfo.java rename to app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java index 1935414c..7c183132 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/WellKnownNodeinfo.java +++ b/app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities; +package app.fedilab.android.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java b/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java index 11c9a38b..8a6c0b04 100644 --- a/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java @@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; public class CommentDecorationHelper { diff --git a/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java b/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java index 560e72c6..c1f5e404 100644 --- a/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java @@ -36,10 +36,10 @@ import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ComposeActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.mastodon.MastodonSearchService; -import app.fedilab.android.client.mastodon.entities.Results; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonSearchService; +import app.fedilab.android.client.entities.api.Results; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Account; import app.fedilab.android.exception.DBException; import app.fedilab.android.ui.drawer.AccountsSearchAdapter; import app.fedilab.android.viewmodel.mastodon.AccountsVM; @@ -63,7 +63,7 @@ public class CrossActionHelper { * @param targetedAccount mastodon account that is targeted * @param targetedStatus status that is targeted */ - public static void doCrossAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, app.fedilab.android.client.mastodon.entities.Account targetedAccount, Status targetedStatus) { + public static void doCrossAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, app.fedilab.android.client.entities.api.Account targetedAccount, Status targetedStatus) { final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); new Thread(() -> { try { @@ -73,7 +73,7 @@ public class CrossActionHelper { Runnable myRunnable = () -> fetchRemote(context, actionType, accounts.get(0), targetedAccount, targetedStatus); mainHandler.post(myRunnable); } else { - List accountList = new ArrayList<>(); + List accountList = new ArrayList<>(); for (Account account : accounts) { accountList.add(account.mastodon_account); } @@ -127,7 +127,7 @@ public class CrossActionHelper { /** * Fetch and federate the remote account or status */ - private static void fetchRemote(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull Account ownerAccount, app.fedilab.android.client.mastodon.entities.Account targetedAccount, Status targetedStatus) { + private static void fetchRemote(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull Account ownerAccount, app.fedilab.android.client.entities.api.Account targetedAccount, Status targetedStatus) { SearchVM searchVM = new ViewModelProvider((ViewModelStoreOwner) context).get("crossactions", SearchVM.class); if (targetedAccount != null) { @@ -140,7 +140,7 @@ public class CrossActionHelper { searchVM.search(ownerAccount.instance, ownerAccount.token, search, null, "accounts", false, true, false, 0, null, null, 1) .observe((LifecycleOwner) context, results -> { if (results.accounts != null && results.accounts.size() > 0) { - app.fedilab.android.client.mastodon.entities.Account account = results.accounts.get(0); + app.fedilab.android.client.entities.api.Account account = results.accounts.get(0); applyAction(context, actionType, ownerAccount, account, null); } else { Toasty.info(context, context.getString(R.string.toast_error_search), Toasty.LENGTH_SHORT).show(); @@ -165,7 +165,7 @@ public class CrossActionHelper { /** * Do action when status or account has been fetched */ - private static void applyAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull Account ownerAccount, app.fedilab.android.client.mastodon.entities.Account targetedAccount, Status targetedStatus) { + private static void applyAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull Account ownerAccount, app.fedilab.android.client.entities.api.Account targetedAccount, Status targetedStatus) { AccountsVM accountsVM = null; StatusesVM statusesVM = null; @@ -306,7 +306,7 @@ public class CrossActionHelper { /** * Fetch and federate the remote status */ - public static void fetchRemoteAccount(@NonNull Context context, @NonNull Account ownerAccount, app.fedilab.android.client.mastodon.entities.Account targetedAccount, Callback callback) { + public static void fetchRemoteAccount(@NonNull Context context, @NonNull Account ownerAccount, app.fedilab.android.client.entities.api.Account targetedAccount, Callback callback) { MastodonSearchService mastodonSearchService = init(context, MainActivity.currentInstance); @@ -354,13 +354,6 @@ public class CrossActionHelper { }).start(); } - public interface Callback { - void federatedStatus(Status status); - - void federatedAccount(app.fedilab.android.client.mastodon.entities.Account account); - } - - public enum TypeOfCrossAction { FOLLOW_ACTION, UNFOLLOW_ACTION, @@ -376,4 +369,11 @@ public class CrossActionHelper { UNREBLOG_ACTION, REPLY_ACTION } + + + public interface Callback { + void federatedStatus(Status status); + + void federatedAccount(app.fedilab.android.client.entities.api.Account account); + } } diff --git a/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java b/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java index 9ed2c742..7245d29b 100644 --- a/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java +++ b/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java @@ -31,7 +31,7 @@ import java.util.Arrays; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.ui.drawer.StatusAdapter; public class DividerDecoration extends RecyclerView.ItemDecoration { diff --git a/app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java b/app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java index f67bb542..bc282194 100644 --- a/app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java +++ b/app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java @@ -29,7 +29,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.ui.drawer.ComposeAdapter; public class DividerDecorationSimple extends RecyclerView.ItemDecoration { diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java index 634cf4fa..dd5ec28f 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/helper/Helper.java @@ -124,10 +124,10 @@ import app.fedilab.android.activities.LoginActivity; import app.fedilab.android.activities.MainActivity; import app.fedilab.android.activities.WebviewActivity; import app.fedilab.android.broadcastreceiver.ToastMessage; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.QuickLoad; -import app.fedilab.android.client.entities.StatusCache; -import app.fedilab.android.client.mastodon.entities.Attachment; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.QuickLoad; +import app.fedilab.android.client.entities.app.StatusCache; import app.fedilab.android.exception.DBException; import app.fedilab.android.sqlite.Sqlite; import app.fedilab.android.viewmodel.mastodon.OauthVM; @@ -282,6 +282,11 @@ public class Helper { "(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,10}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL); + // --- Static Map of patterns used in spannable status content + public static final Map patternHashMap; + public static final int NOTIFICATION_MEDIA = 451; + public static final int NOTIFICATION_USER_NOTIF = 411; + public static final int NOTIFICATION_THEMING = 412; /* * List from ClearUrls * https://gitlab.com/KevinRoebert/ClearUrls/blob/master/data/data.min.json#L106 @@ -312,9 +317,6 @@ public class Helper { "[\\?|&]ref[\\_]?" }; - - // --- Static Map of patterns used in spannable status content - public static final Map patternHashMap; public static int counter = 1; static { @@ -791,7 +793,6 @@ public class Helper { return cleaned_content; } - @SuppressLint("DefaultLocale") public static String withSuffix(long count) { if (count < 1000) return "" + count; @@ -1001,11 +1002,6 @@ public class Helper { } - - public static final int NOTIFICATION_MEDIA = 451; - public static final int NOTIFICATION_USER_NOTIF = 411; - public static final int NOTIFICATION_THEMING = 412; - /** * Sends notification with intent * @@ -1465,6 +1461,25 @@ public class Helper { } } + /** + * Send broadcast to recreate Mainactivity + * + * @param activity - Activity + */ + public static void recreateMainActivity(Activity activity) { + Bundle b = new Bundle(); + b.putBoolean(Helper.RECEIVE_RECREATE_ACTIVITY, true); + Intent intentBD = new Intent(Helper.BROADCAST_DATA); + intentBD.putExtras(b); + LocalBroadcastManager.getInstance(activity).sendBroadcast(intentBD); + } + + public static void showKeyboard(Context context, View view) { + view.requestFocus(); + InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); + imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); + } + //Enum that described actions to replace inside a toot content public enum PatternType { MENTION, @@ -1485,6 +1500,7 @@ public class Helper { TOOT } + public interface OnAttachmentCopied { void onAttachmentCopied(Attachment attachment); } @@ -1549,24 +1565,4 @@ public class Helper { }).start(); } } - - - /** - * Send broadcast to recreate Mainactivity - * - * @param activity - Activity - */ - public static void recreateMainActivity(Activity activity) { - Bundle b = new Bundle(); - b.putBoolean(Helper.RECEIVE_RECREATE_ACTIVITY, true); - Intent intentBD = new Intent(Helper.BROADCAST_DATA); - intentBD.putExtras(b); - LocalBroadcastManager.getInstance(activity).sendBroadcast(intentBD); - } - - public static void showKeyboard(Context context, View view) { - view.requestFocus(); - InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); - imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); - } } 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 a57f223e..13bfee20 100644 --- a/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java @@ -49,11 +49,11 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.ScheduledBoost; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.RelationShip; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.ScheduledBoost; import app.fedilab.android.databinding.DatetimePickerBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.jobs.ScheduleBoostWorker; @@ -191,11 +191,11 @@ public class MastodonHelper { return pagination; } */ - public static void loadPPMastodon(ImageView view, app.fedilab.android.client.mastodon.entities.Account account) { + public static void loadPPMastodon(ImageView view, Account account) { loadProfileMediaMastodon(view, account, MediaAccountType.AVATAR); } - public static void loadProfileMediaMastodon(ImageView view, app.fedilab.android.client.mastodon.entities.Account account, MediaAccountType type) { + public static void loadProfileMediaMastodon(ImageView view, Account account, MediaAccountType type) { Context context = view.getContext(); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); boolean disableGif = sharedpreferences.getBoolean(context.getString(R.string.SET_DISABLE_GIF), false); diff --git a/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java b/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java index 0c1039f7..4e8fcc38 100644 --- a/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java @@ -49,10 +49,10 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.mastodon.MastodonNotificationsService; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.Notifications; +import app.fedilab.android.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.Notifications; +import app.fedilab.android.client.entities.app.Account; import app.fedilab.android.exception.DBException; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java b/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java index 5b0b8545..e36cb86b 100644 --- a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java @@ -43,13 +43,13 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.BottomMenu; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.app.BottomMenu; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; import app.fedilab.android.client.entities.app.RemoteInstance; import app.fedilab.android.client.entities.app.TagTimeline; -import app.fedilab.android.client.mastodon.entities.MastodonList; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityMainBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; diff --git a/app/src/main/java/app/fedilab/android/helper/PushHelper.java b/app/src/main/java/app/fedilab/android/helper/PushHelper.java index ee1ed502..87a20402 100644 --- a/app/src/main/java/app/fedilab/android/helper/PushHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/PushHelper.java @@ -37,7 +37,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Account; +import app.fedilab.android.client.entities.app.Account; import app.fedilab.android.jobs.NotificationsWorker; public class PushHelper { diff --git a/app/src/main/java/app/fedilab/android/helper/PushNotifications.java b/app/src/main/java/app/fedilab/android/helper/PushNotifications.java index 3d4e588f..a45f779d 100644 --- a/app/src/main/java/app/fedilab/android/helper/PushNotifications.java +++ b/app/src/main/java/app/fedilab/android/helper/PushNotifications.java @@ -32,9 +32,9 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.mastodon.MastodonNotificationsService; -import app.fedilab.android.client.mastodon.entities.PushSubscription; +import app.fedilab.android.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.client.entities.api.PushSubscription; +import app.fedilab.android.client.entities.app.Account; import app.fedilab.android.exception.DBException; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java index b64c6599..0fdfb9e0 100644 --- a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java @@ -75,13 +75,13 @@ import app.fedilab.android.activities.ContextActivity; import app.fedilab.android.activities.HashTagActivity; import app.fedilab.android.activities.MainActivity; import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Emoji; -import app.fedilab.android.client.mastodon.entities.Field; -import app.fedilab.android.client.mastodon.entities.Mention; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Emoji; +import app.fedilab.android.client.entities.api.Field; +import app.fedilab.android.client.entities.api.Mention; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.PopupLinksBinding; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java b/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java index 552443b0..1f27e3db 100644 --- a/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java @@ -372,12 +372,6 @@ public class ThemeHelper { return new ColorStateList(states, colors); } - - public interface SlideAnimation { - void onAnimationEnded(); - } - - /** * Allow to change font scale in activities * @@ -393,4 +387,9 @@ public class ThemeHelper { metrics.scaledDensity = configuration.fontScale * metrics.density; activity.getBaseContext().getResources().updateConfiguration(configuration, metrics); } + + + public interface SlideAnimation { + void onAnimationEnded(); + } } diff --git a/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java b/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java index 6fee1df4..dc8f251d 100644 --- a/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java @@ -33,10 +33,10 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.mastodon.MastodonAccountsService; -import app.fedilab.android.client.mastodon.entities.Filter; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonAccountsService; +import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.viewmodel.mastodon.AccountsVM; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java b/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java index e7b0534e..e9ccdd72 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java +++ b/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.util.Objects; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.entities.Error; +import app.fedilab.android.client.entities.api.Error; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import okhttp3.Request; diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java b/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java index eebd1c7e..589acef6 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java +++ b/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java @@ -14,7 +14,7 @@ package app.fedilab.android.helper.customsharing; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import app.fedilab.android.client.mastodon.entities.Error; +import app.fedilab.android.client.entities.api.Error; /** * Created by Curtis on 13/02/2019. diff --git a/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java b/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java index 3fbd1a57..eed29bf8 100644 --- a/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java +++ b/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java @@ -15,7 +15,7 @@ package app.fedilab.android.interfaces; * see . */ -import app.fedilab.android.client.entities.InstanceSocial; +import app.fedilab.android.client.entities.app.InstanceSocial; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Header; diff --git a/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java b/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java index b1e50257..62094117 100644 --- a/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java +++ b/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java @@ -30,7 +30,7 @@ import androidx.work.Worker; import androidx.work.WorkerParameters; import app.fedilab.android.R; -import app.fedilab.android.client.entities.StatusDraft; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.services.PostMessageService; diff --git a/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java b/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java index 43e66c68..ee6c077c 100644 --- a/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java +++ b/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java @@ -32,9 +32,9 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -import app.fedilab.android.client.entities.ScheduledBoost; -import app.fedilab.android.client.mastodon.MastodonStatusesService; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonStatusesService; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.ScheduledBoost; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; diff --git a/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java b/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java index 202b1e42..5f127590 100644 --- a/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java +++ b/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java @@ -30,7 +30,7 @@ import androidx.work.Worker; import androidx.work.WorkerParameters; import app.fedilab.android.R; -import app.fedilab.android.client.entities.StatusDraft; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.services.PostMessageService; diff --git a/app/src/main/java/app/fedilab/android/services/PostMessageService.java b/app/src/main/java/app/fedilab/android/services/PostMessageService.java index f01a3816..7c18791b 100644 --- a/app/src/main/java/app/fedilab/android/services/PostMessageService.java +++ b/app/src/main/java/app/fedilab/android/services/PostMessageService.java @@ -39,14 +39,14 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.PostState; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.MastodonStatusesService; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.ScheduledStatus; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonStatusesService; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.ScheduledStatus; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.PostState; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.drawer.StatusAdapter; @@ -78,28 +78,6 @@ public class PostMessageService extends IntentService { super("PostMessageService"); } - @Override - public void onCreate() { - super.onCreate(); - notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - if (Build.VERSION.SDK_INT >= 26) { - String channelName = "Post messages"; - String channelDescription = "Post messages in background"; - NotificationChannel notifChannel = new NotificationChannel(CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_HIGH); - notifChannel.setDescription(channelDescription); - notificationManager.createNotificationChannel(notifChannel); - - } - notificationBuilder = new NotificationCompat.Builder(getBaseContext(), CHANNEL_ID); - notificationBuilder.setSmallIcon(R.drawable.ic_notification) - .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher_foreground)) - .setContentTitle(getString(R.string.post_message)) - .setDefaults(NotificationCompat.DEFAULT_ALL) - .setPriority(Notification.PRIORITY_DEFAULT); - startForeground(NOTIFICATION_INT_CHANNEL_ID, notificationBuilder.build()); - } - - private static OkHttpClient getOkHttpClient(Context context) { return new OkHttpClient.Builder() .readTimeout(120, TimeUnit.SECONDS) @@ -318,6 +296,27 @@ public class PostMessageService extends IntentService { } } + @Override + public void onCreate() { + super.onCreate(); + notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + if (Build.VERSION.SDK_INT >= 26) { + String channelName = "Post messages"; + String channelDescription = "Post messages in background"; + NotificationChannel notifChannel = new NotificationChannel(CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_HIGH); + notifChannel.setDescription(channelDescription); + notificationManager.createNotificationChannel(notifChannel); + + } + notificationBuilder = new NotificationCompat.Builder(getBaseContext(), CHANNEL_ID); + notificationBuilder.setSmallIcon(R.drawable.ic_notification) + .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher_foreground)) + .setContentTitle(getString(R.string.post_message)) + .setDefaults(NotificationCompat.DEFAULT_ALL) + .setPriority(Notification.PRIORITY_DEFAULT); + startForeground(NOTIFICATION_INT_CHANNEL_ID, notificationBuilder.build()); + } + @Override protected void onHandleIntent(@Nullable Intent intent) { StatusDraft statusDraft = null; diff --git a/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java b/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java index 3d59ba38..aba6d977 100644 --- a/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java +++ b/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java @@ -18,7 +18,7 @@ import static app.fedilab.android.services.PostMessageService.publishMessage; import android.content.Context; -import app.fedilab.android.client.entities.StatusDraft; +import app.fedilab.android.client.entities.app.StatusDraft; public class ThreadMessageService { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java index dc525e82..6f6e053d 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java @@ -43,7 +43,7 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.DrawerAccountBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java index 7f92a1dc..77accd35 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java @@ -32,8 +32,8 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.MastodonList; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.MastodonList; import app.fedilab.android.databinding.DrawerAccountListBinding; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.viewmodel.mastodon.TimelinesVM; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java index 12ceeea3..2b23a0e5 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java @@ -23,7 +23,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.DrawerAccountReplyBinding; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java index 221e4a36..40c7b697 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java @@ -28,7 +28,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.DrawerAccountSearchBinding; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java index 8f0fb68b..456a57b4 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java @@ -80,15 +80,15 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ComposeActivity; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Emoji; -import app.fedilab.android.client.mastodon.entities.EmojiInstance; -import app.fedilab.android.client.mastodon.entities.Mention; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Emoji; +import app.fedilab.android.client.entities.api.EmojiInstance; +import app.fedilab.android.client.entities.api.Mention; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Tag; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.ComposeAttachmentItemBinding; import app.fedilab.android.databinding.ComposePollBinding; import app.fedilab.android.databinding.ComposePollItemBinding; @@ -117,15 +117,15 @@ public class ComposeAdapter extends RecyclerView.Adapter statusList; private final int TYPE_NORMAL = 0; private final Account account; + private final String visibility; + private final app.fedilab.android.client.entities.api.Account mentionedAccount; public ManageDrafts manageDrafts; List emojis; private int statusCount; private Context context; private AlertDialog alertDialogEmoji; - private final String visibility; - private final app.fedilab.android.client.mastodon.entities.Account mentionedAccount; - public ComposeAdapter(List statusList, int statusCount, Account account, app.fedilab.android.client.mastodon.entities.Account mentionedAccount, String visibility) { + public ComposeAdapter(List statusList, int statusCount, Account account, app.fedilab.android.client.entities.api.Account mentionedAccount, String visibility) { this.statusList = statusList; this.statusCount = statusCount; this.account = account; @@ -804,7 +804,7 @@ public class ComposeAdapter extends RecyclerView.Adapter 0) { final String search = searchA[searchA.length - 1]; holder.binding.content.setOnItemClickListener((parent, view, position, id) -> { - app.fedilab.android.client.mastodon.entities.Account account = accounts.get(position); + app.fedilab.android.client.entities.api.Account account = accounts.get(position); String deltaSearch = ""; int searchLength = searchDeep; if (currentCursorPosition < searchDeep) { //Less than 15 characters are written before the cursor position diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ContextAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ContextAdapter.java index 639d56bc..b9afc7fc 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ContextAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ContextAdapter.java @@ -28,8 +28,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerStatusBinding; import app.fedilab.android.viewmodel.mastodon.SearchVM; import app.fedilab.android.viewmodel.mastodon.StatusesVM; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java index ac1edb3c..a702de62 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java @@ -43,10 +43,10 @@ import java.util.TimerTask; import app.fedilab.android.R; import app.fedilab.android.activities.ContextActivity; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Conversation; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Conversation; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.DrawerConversationBinding; import app.fedilab.android.databinding.ThumbnailBinding; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java index 05f110ac..785c3836 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java @@ -39,7 +39,7 @@ import java.io.File; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Emoji; +import app.fedilab.android.client.entities.api.Emoji; import app.fedilab.android.databinding.DrawerEmojiPickerBinding; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java index 5f6dd03f..a61fb7cb 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java @@ -33,7 +33,7 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Emoji; +import app.fedilab.android.client.entities.api.Emoji; import app.fedilab.android.databinding.DrawerEmojiSearchBinding; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java index 84a77ebe..8c6e62a9 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java @@ -30,7 +30,7 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.FilterActivity; -import app.fedilab.android.client.mastodon.entities.Filter; +import app.fedilab.android.client.entities.api.Filter; import app.fedilab.android.databinding.DrawerFilterBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.viewmodel.mastodon.AccountsVM; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java index 517e74a4..6672249e 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java @@ -24,7 +24,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.IdentityProof; +import app.fedilab.android.client.entities.api.IdentityProof; import app.fedilab.android.databinding.DrawerIdentityProofsBinding; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java index 1604d241..e661a478 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java @@ -31,7 +31,7 @@ import com.bumptech.glide.request.RequestOptions; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.JoinMastodonInstance; +import app.fedilab.android.client.entities.api.JoinMastodonInstance; import app.fedilab.android.databinding.DrawerInstanceRegBinding; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java index ccb7b3f7..0d1d1a72 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java @@ -22,7 +22,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.mastodon.entities.MastodonList; +import app.fedilab.android.client.entities.api.MastodonList; import app.fedilab.android.databinding.DrawerListBinding; public class MastodonListAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java index 63ee75b1..f5cec305 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java @@ -36,8 +36,8 @@ import java.util.Locale; import app.fedilab.android.R; import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Notification; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerFollowBinding; import app.fedilab.android.databinding.DrawerStatusNotificationBinding; import app.fedilab.android.databinding.NotificationsRelatedAccountsBinding; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java index 499f062b..276d99e0 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java @@ -31,7 +31,7 @@ import java.util.Collections; import app.fedilab.android.R; import app.fedilab.android.activities.ReorderTimelinesActivity; -import app.fedilab.android.client.entities.BottomMenu; +import app.fedilab.android.client.entities.app.BottomMenu; import app.fedilab.android.databinding.DrawerReorderBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperAdapter; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java index 82bf356f..9011a4a5 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java @@ -31,9 +31,9 @@ import java.util.Collections; import app.fedilab.android.R; import app.fedilab.android.activities.ReorderTimelinesActivity; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerReorderBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperAdapter; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java index 576e15fe..24b95a1e 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java @@ -23,7 +23,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Instance; +import app.fedilab.android.client.entities.api.Instance; import app.fedilab.android.databinding.DrawerCheckboxBinding; public class RulesAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 6b86702a..70fd0be8 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -100,12 +100,12 @@ import app.fedilab.android.activities.MediaActivity; import app.fedilab.android.activities.ProfileActivity; import app.fedilab.android.activities.ReportActivity; import app.fedilab.android.activities.StatusInfoActivity; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.StatusDraft; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerStatusArtBinding; import app.fedilab.android.databinding.DrawerStatusBinding; import app.fedilab.android.databinding.DrawerStatusHiddenBinding; @@ -128,14 +128,13 @@ import jp.wasabeef.glide.transformations.BlurTransformation; public class StatusAdapter extends RecyclerView.Adapter { - private final List statusList; - private final boolean minified; - private Context context; - private final Timeline.TimeLineEnum timelineType; - public static final int STATUS_HIDDEN = 0; public static final int STATUS_VISIBLE = 1; public static final int STATUS_ART = 2; + private final List statusList; + private final boolean minified; + private final Timeline.TimeLineEnum timelineType; + private Context context; public StatusAdapter(List statuses, Timeline.TimeLineEnum timelineType, boolean minified) { this.statusList = statuses; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java index 95fa8341..8007bd40 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java @@ -33,9 +33,9 @@ import java.util.List; import app.fedilab.android.R; import app.fedilab.android.activities.ComposeActivity; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.DrawerStatusDraftBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java index 3518977f..011fadbe 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java @@ -40,9 +40,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ComposeActivity; -import app.fedilab.android.client.entities.ScheduledBoost; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.entities.ScheduledStatus; +import app.fedilab.android.client.entities.api.ScheduledStatus; +import app.fedilab.android.client.entities.app.ScheduledBoost; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.DrawerStatusScheduledBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java index cda34da8..8f790da5 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java @@ -36,8 +36,8 @@ import java.util.List; import app.fedilab.android.R; import app.fedilab.android.activities.HashTagActivity; -import app.fedilab.android.client.mastodon.entities.History; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.History; +import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.DrawerTagBinding; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java index 57851c19..304d700d 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java @@ -14,7 +14,7 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.DrawerTagSearchBinding; /* Copyright 2021 Thomas Schneider diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TopMenuAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/TopMenuAdapter.java index 5ae6ba9c..439316e2 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TopMenuAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/TopMenuAdapter.java @@ -27,8 +27,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Timeline; import app.fedilab.android.client.entities.app.PinnedTimeline; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerTopMenuItemBinding; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java b/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java index 5c5700d6..0b03d571 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java @@ -50,8 +50,8 @@ import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ProxyActivity; import app.fedilab.android.activities.WebviewConnectActivity; -import app.fedilab.android.client.entities.Account; -import app.fedilab.android.client.entities.InstanceSocial; +import app.fedilab.android.client.entities.app.Account; +import app.fedilab.android.client.entities.app.InstanceSocial; import app.fedilab.android.databinding.FragmentLoginMainBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java b/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java index 0a3caa0b..8747fefd 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java @@ -30,7 +30,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.JoinMastodonInstance; +import app.fedilab.android.client.entities.api.JoinMastodonInstance; import app.fedilab.android.databinding.FragmentLoginPickInstanceMastodonBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.drawer.InstanceRegAdapter; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java b/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java index 2ef2be7e..af7f8fa4 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java @@ -48,7 +48,7 @@ import java.util.Timer; import app.fedilab.android.R; import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.client.mastodon.entities.Attachment; +import app.fedilab.android.client.entities.api.Attachment; import app.fedilab.android.databinding.FragmentSlideMediaBinding; import app.fedilab.android.helper.CacheDataSourceFactory; import app.fedilab.android.helper.Helper; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java index ecb3e874..9f57c2f2 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java @@ -32,11 +32,11 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Accounts; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.RelationShip; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Accounts; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java index 6b4332a4..5eebb569 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java @@ -39,9 +39,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.ContextActivity; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Context; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Context; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.DividerDecoration; import app.fedilab.android.helper.Helper; @@ -58,11 +58,6 @@ public class FragmentMastodonContext extends Fragment { private StatusesVM statusesVM; private List statuses; private StatusAdapter statusAdapter; - private Status focusedStatus; - private Status firstStatus; - private boolean pullToRefresh; - - //Handle actions that can be done in other fragments private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override @@ -128,7 +123,9 @@ public class FragmentMastodonContext extends Fragment { } } }; - + private Status focusedStatus; + private Status firstStatus; + private boolean pullToRefresh; /** * Return the position of the status in the ArrayList diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java index d2f2650b..bc036bc2 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java @@ -32,8 +32,8 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Conversation; -import app.fedilab.android.client.mastodon.entities.Conversations; +import app.fedilab.android.client.entities.api.Conversation; +import app.fedilab.android.client.entities.api.Conversations; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java index 36a6a92e..3f00405b 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java @@ -41,9 +41,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.Notifications; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.Notifications; +import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; @@ -62,10 +62,6 @@ public class FragmentMastodonNotification extends Fragment { private List notifications; private String max_id; private NotificationAdapter notificationAdapter; - private NotificationTypeEnum notificationType; - private List excludeType; - private boolean aggregateNotification; - private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -86,6 +82,9 @@ public class FragmentMastodonNotification extends Fragment { } } }; + private NotificationTypeEnum notificationType; + private List excludeType; + private boolean aggregateNotification; /** * Return the position of the status in the ArrayList @@ -177,7 +176,7 @@ public class FragmentMastodonNotification extends Fragment { /** * Intialize the view for notifications * - * @param notifications {@link app.fedilab.android.client.mastodon.entities.Notifications} + * @param notifications {@link Notifications} */ private void initializeNotificationView(final Notifications notifications) { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java index 2e7d5bf6..7f3fddb7 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java @@ -30,7 +30,7 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Tag; +import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; 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 67d34c0f..7e4811bf 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 @@ -42,15 +42,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.QuickLoad; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Marker; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Statuses; +import app.fedilab.android.client.entities.app.QuickLoad; import app.fedilab.android.client.entities.app.TagTimeline; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Marker; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Statuses; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; @@ -75,16 +75,6 @@ public class FragmentMastodonTimeline extends Fragment { private String max_id, min_id; private StatusAdapter statusAdapter; private Timeline.TimeLineEnum timelineType; - private List markers; - private String list_id; - private TagTimeline tagTimeline; - private LinearLayoutManager mLayoutManager; - private Account accountTimeline; - private boolean exclude_replies, exclude_reblogs, show_pinned, media_only, minified; - private String viewModelKey, remoteInstance; - private String ident; - private String instance, user_id; - //Handle actions that can be done in other fragments private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override @@ -137,6 +127,15 @@ public class FragmentMastodonTimeline extends Fragment { } } }; + private List markers; + private String list_id; + private TagTimeline tagTimeline; + private LinearLayoutManager mLayoutManager; + private Account accountTimeline; + private boolean exclude_replies, exclude_reblogs, show_pinned, media_only, minified; + private String viewModelKey, remoteInstance; + private String ident; + private String instance, user_id; /** * Return the position of the status in the ArrayList diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java index 08428709..b0e411f5 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java @@ -27,7 +27,7 @@ import androidx.fragment.app.Fragment; import com.google.android.material.tabs.TabLayout; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.FragmentProfileTimelinesBinding; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.ThemeHelper; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java index 29852b4c..7475f03c 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java @@ -31,9 +31,9 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.ScheduledBoost; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.ScheduledBoost; +import app.fedilab.android.client.entities.app.StatusDraft; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentScheduledBinding; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; 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 3a499321..d9716bc8 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 @@ -22,10 +22,10 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.client.entities.BottomMenu; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.BottomMenu; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.client.entities.app.PinnedTimeline; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java index 73c29528..791a1f3e 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java @@ -22,8 +22,8 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.client.entities.Timeline; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java index c2e32d49..cb90db7c 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java @@ -22,7 +22,7 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.client.mastodon.entities.Account; +import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonAccount; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java index df47eba1..c2cc502a 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java @@ -22,7 +22,7 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.client.entities.Timeline; +import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.helper.Helper; import app.fedilab.android.ui.fragment.timeline.FragmentScheduled; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java index 78e9b3ad..e5bfc3b9 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java @@ -31,23 +31,23 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.mastodon.MastodonAccountsService; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Accounts; -import app.fedilab.android.client.mastodon.entities.FeaturedTag; -import app.fedilab.android.client.mastodon.entities.Field; -import app.fedilab.android.client.mastodon.entities.Filter; -import app.fedilab.android.client.mastodon.entities.IdentityProof; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.Preferences; -import app.fedilab.android.client.mastodon.entities.RelationShip; -import app.fedilab.android.client.mastodon.entities.Report; -import app.fedilab.android.client.mastodon.entities.Source; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Statuses; -import app.fedilab.android.client.mastodon.entities.Tag; -import app.fedilab.android.client.mastodon.entities.Token; +import app.fedilab.android.client.endpoints.MastodonAccountsService; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Accounts; +import app.fedilab.android.client.entities.api.FeaturedTag; +import app.fedilab.android.client.entities.api.Field; +import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.client.entities.api.IdentityProof; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.Preferences; +import app.fedilab.android.client.entities.api.RelationShip; +import app.fedilab.android.client.entities.api.Report; +import app.fedilab.android.client.entities.api.Source; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Statuses; +import app.fedilab.android.client.entities.api.Tag; +import app.fedilab.android.client.entities.api.Token; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.SpannableHelper; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java index 7b2da82b..33d4dfcf 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java @@ -27,9 +27,9 @@ import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonAdminService; -import app.fedilab.android.client.mastodon.entities.AdminAccount; -import app.fedilab.android.client.mastodon.entities.AdminReport; +import app.fedilab.android.client.endpoints.MastodonAdminService; +import app.fedilab.android.client.entities.api.AdminAccount; +import app.fedilab.android.client.entities.api.AdminReport; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java index e29ec780..b4f37082 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonAnnouncementsService; -import app.fedilab.android.client.mastodon.entities.Announcement; +import app.fedilab.android.client.endpoints.MastodonAnnouncementsService; +import app.fedilab.android.client.entities.api.Announcement; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java index eb7733c9..76911ab5 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java @@ -26,8 +26,8 @@ import androidx.lifecycle.MutableLiveData; import java.io.IOException; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonAppsService; -import app.fedilab.android.client.mastodon.entities.App; +import app.fedilab.android.client.endpoints.MastodonAppsService; +import app.fedilab.android.client.entities.api.App; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java index dc83a4af..a4e83f10 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java @@ -25,7 +25,7 @@ import androidx.lifecycle.MutableLiveData; import java.io.IOException; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.entities.InstanceSocial; +import app.fedilab.android.client.entities.app.InstanceSocial; import app.fedilab.android.helper.Helper; import app.fedilab.android.interfaces.InstancesSocialService; import okhttp3.OkHttpClient; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java index d23ab876..6a1fec1b 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java @@ -29,11 +29,11 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.mastodon.MastodonInstanceService; -import app.fedilab.android.client.mastodon.entities.Emoji; -import app.fedilab.android.client.mastodon.entities.EmojiInstance; -import app.fedilab.android.client.mastodon.entities.Instance; -import app.fedilab.android.client.mastodon.entities.InstanceInfo; +import app.fedilab.android.client.endpoints.MastodonInstanceService; +import app.fedilab.android.client.entities.api.Emoji; +import app.fedilab.android.client.entities.api.EmojiInstance; +import app.fedilab.android.client.entities.api.Instance; +import app.fedilab.android.client.entities.api.InstanceInfo; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java index 61a384c9..61b8c5c9 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.JoinMastodonService; -import app.fedilab.android.client.mastodon.entities.JoinMastodonInstance; +import app.fedilab.android.client.endpoints.JoinMastodonService; +import app.fedilab.android.client.entities.api.JoinMastodonInstance; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java index ff11bdce..de08ccc5 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java @@ -28,7 +28,7 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; import app.fedilab.android.client.NodeInfoService; -import app.fedilab.android.client.entities.WellKnownNodeinfo; +import app.fedilab.android.client.entities.app.WellKnownNodeinfo; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java index 55abd006..13355349 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java @@ -27,10 +27,10 @@ import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonNotificationsService; -import app.fedilab.android.client.mastodon.entities.Notification; -import app.fedilab.android.client.mastodon.entities.Notifications; -import app.fedilab.android.client.mastodon.entities.PushSubscription; +import app.fedilab.android.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.client.entities.api.Notifications; +import app.fedilab.android.client.entities.api.PushSubscription; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.SpannableHelper; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java index db388295..38bc0718 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java @@ -26,8 +26,8 @@ import androidx.lifecycle.MutableLiveData; import java.io.IOException; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonAppsService; -import app.fedilab.android.client.mastodon.entities.Token; +import app.fedilab.android.client.endpoints.MastodonAppsService; +import app.fedilab.android.client.entities.api.Token; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java index 296120d9..f1159a65 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java @@ -21,7 +21,7 @@ import androidx.lifecycle.AndroidViewModel; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.mastodon.MastodonOembedService; +import app.fedilab.android.client.endpoints.MastodonOembedService; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Retrofit; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java index 1af337ef..7df68955 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java @@ -28,10 +28,10 @@ import java.util.ArrayList; import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.BottomMenu; -import app.fedilab.android.client.entities.Pinned; -import app.fedilab.android.client.mastodon.MastodonSearchService; -import app.fedilab.android.client.mastodon.entities.Results; +import app.fedilab.android.client.endpoints.MastodonSearchService; +import app.fedilab.android.client.entities.api.Results; +import app.fedilab.android.client.entities.app.BottomMenu; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import okhttp3.OkHttpClient; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java index ea703941..a454d24f 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java @@ -28,10 +28,10 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.entities.StatusCache; -import app.fedilab.android.client.mastodon.MastodonSearchService; -import app.fedilab.android.client.mastodon.entities.Results; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonSearchService; +import app.fedilab.android.client.entities.api.Results; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.StatusCache; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.SpannableHelper; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java index a1ce0ac7..b7b3c449 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java @@ -31,18 +31,19 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -import app.fedilab.android.client.entities.QuickLoad; -import app.fedilab.android.client.entities.StatusCache; -import app.fedilab.android.client.mastodon.MastodonStatusesService; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Accounts; -import app.fedilab.android.client.mastodon.entities.Attachment; -import app.fedilab.android.client.mastodon.entities.Card; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.Poll; -import app.fedilab.android.client.mastodon.entities.ScheduledStatus; -import app.fedilab.android.client.mastodon.entities.ScheduledStatuses; -import app.fedilab.android.client.mastodon.entities.Status; +import app.fedilab.android.client.endpoints.MastodonStatusesService; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Accounts; +import app.fedilab.android.client.entities.api.Attachment; +import app.fedilab.android.client.entities.api.Card; +import app.fedilab.android.client.entities.api.Context; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.Poll; +import app.fedilab.android.client.entities.api.ScheduledStatus; +import app.fedilab.android.client.entities.api.ScheduledStatuses; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.app.QuickLoad; +import app.fedilab.android.client.entities.app.StatusCache; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; @@ -67,7 +68,7 @@ public class StatusesVM extends AndroidViewModel { private MutableLiveData cardMutableLiveData; private MutableLiveData attachmentMutableLiveData; private MutableLiveData pollMutableLiveData; - private MutableLiveData contextMutableLiveData; + private MutableLiveData contextMutableLiveData; private MutableLiveData accountsMutableLiveData; @@ -253,7 +254,7 @@ public class StatusesVM extends AndroidViewModel { } } Handler mainHandler = new Handler(Looper.getMainLooper()); - app.fedilab.android.client.mastodon.entities.ScheduledStatus finalScheduledStatus = scheduledStatus; + ScheduledStatus finalScheduledStatus = scheduledStatus; Runnable myRunnable = () -> scheduledStatusMutableLiveData.setValue(finalScheduledStatus); mainHandler.post(myRunnable); }).start(); @@ -318,7 +319,7 @@ public class StatusesVM extends AndroidViewModel { } //The status must also be deleted in cache try { - app.fedilab.android.client.entities.Account account = new app.fedilab.android.client.entities.Account(getApplication().getApplicationContext()).getAccountByToken(token); + app.fedilab.android.client.entities.app.Account account = new app.fedilab.android.client.entities.app.Account(getApplication().getApplicationContext()).getAccountByToken(token); new StatusCache(getApplication().getApplicationContext()).deleteStatus(id, account.instance); new QuickLoad(getApplication().getApplicationContext()).deleteStatus(account, id); } catch (DBException e) { @@ -342,15 +343,15 @@ public class StatusesVM extends AndroidViewModel { * @param id String - id of the status * @return LiveData */ - public LiveData getContext(@NonNull String instance, String token, @NonNull String id) { + public LiveData getContext(@NonNull String instance, String token, @NonNull String id) { MastodonStatusesService mastodonStatusesService = init(instance); contextMutableLiveData = new MutableLiveData<>(); new Thread(() -> { - Call contextCall = mastodonStatusesService.getContext(token, id); - app.fedilab.android.client.mastodon.entities.Context context = null; + Call contextCall = mastodonStatusesService.getContext(token, id); + Context context = null; if (contextCall != null) { try { - Response contextResponse = contextCall.execute(); + Response contextResponse = contextCall.execute(); if (contextResponse.isSuccessful()) { context = contextResponse.body(); if (context != null) { @@ -370,7 +371,7 @@ public class StatusesVM extends AndroidViewModel { } } Handler mainHandler = new Handler(Looper.getMainLooper()); - app.fedilab.android.client.mastodon.entities.Context finalContext = context; + Context finalContext = context; Runnable myRunnable = () -> contextMutableLiveData.setValue(finalContext); mainHandler.post(myRunnable); }).start(); diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java index b2c62d35..c4dec0cd 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java @@ -29,17 +29,17 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.StatusCache; -import app.fedilab.android.client.entities.StatusDraft; -import app.fedilab.android.client.mastodon.MastodonTimelinesService; -import app.fedilab.android.client.mastodon.entities.Account; -import app.fedilab.android.client.mastodon.entities.Conversation; -import app.fedilab.android.client.mastodon.entities.Conversations; -import app.fedilab.android.client.mastodon.entities.Marker; -import app.fedilab.android.client.mastodon.entities.MastodonList; -import app.fedilab.android.client.mastodon.entities.Pagination; -import app.fedilab.android.client.mastodon.entities.Status; -import app.fedilab.android.client.mastodon.entities.Statuses; +import app.fedilab.android.client.endpoints.MastodonTimelinesService; +import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.client.entities.api.Conversation; +import app.fedilab.android.client.entities.api.Conversations; +import app.fedilab.android.client.entities.api.Marker; +import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.client.entities.api.Statuses; +import app.fedilab.android.client.entities.app.StatusCache; +import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.exception.DBException; import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; @@ -276,10 +276,10 @@ public class TimelinesVM extends AndroidViewModel { /** * Get user drafts * - * @param account app.fedilab.android.client.entities.Account + * @param account app.fedilab.android.client.entities.app.Account * @return LiveData> */ - public LiveData> getDrafts(app.fedilab.android.client.entities.Account account) { + public LiveData> getDrafts(app.fedilab.android.client.entities.app.Account account) { statusDraftListMutableLiveData = new MutableLiveData<>(); new Thread(() -> { List statusCacheDAO = null; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java index 87ed69fa..776c4ce2 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java @@ -24,7 +24,7 @@ import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.Pinned; +import app.fedilab.android.client.entities.app.Pinned; import app.fedilab.android.exception.DBException; public class TopBarVM extends AndroidViewModel {