diff --git a/app/build.gradle b/app/build.gradle index 34332b99..8e0b66e4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,6 +63,15 @@ android { java.srcDirs = ['src/main/java', 'src/fdroid/java'] res.srcDirs = ['src/main/res', 'src/fdroid/res'] } + main { + res.srcDirs = [ + 'src/main/res/layouts/mastodon', + 'src/main/res/layouts/peertube', + ' src/main/res/layouts', + 'src/main/res' + + ] + } } configurations { all { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 61a0d0a4..d1bd6870 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -168,49 +168,49 @@ @@ -240,102 +240,102 @@ android:theme="@style/AppThemeBar" /> @@ -350,7 +350,7 @@ @@ -358,7 +358,7 @@ diff --git a/app/src/main/java/app/fedilab/android/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/BaseMainActivity.java index dd2097a8..8d572ea8 100644 --- a/app/src/main/java/app/fedilab/android/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/BaseMainActivity.java @@ -16,10 +16,10 @@ package app.fedilab.android; import static app.fedilab.android.BaseMainActivity.status.DISCONNECTED; import static app.fedilab.android.BaseMainActivity.status.UNKNOWN; -import static app.fedilab.android.helper.CacheHelper.deleteDir; -import static app.fedilab.android.helper.Helper.PREF_USER_TOKEN; -import static app.fedilab.android.helper.Helper.displayReleaseNotesIfNeeded; -import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; +import static app.fedilab.android.mastodon.helper.CacheHelper.deleteDir; +import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_TOKEN; +import static app.fedilab.android.mastodon.helper.Helper.displayReleaseNotesIfNeeded; +import static app.fedilab.android.mastodon.ui.drawer.StatusAdapter.sendAction; import android.Manifest; import android.annotation.SuppressLint; @@ -104,69 +104,69 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import app.fedilab.android.activities.AboutActivity; -import app.fedilab.android.activities.ActionActivity; -import app.fedilab.android.activities.AnnouncementActivity; -import app.fedilab.android.activities.BaseActivity; -import app.fedilab.android.activities.CacheActivity; -import app.fedilab.android.activities.ComposeActivity; -import app.fedilab.android.activities.ContextActivity; -import app.fedilab.android.activities.DirectoryActivity; -import app.fedilab.android.activities.DraftActivity; -import app.fedilab.android.activities.FilterActivity; -import app.fedilab.android.activities.FollowRequestActivity; -import app.fedilab.android.activities.FollowedTagActivity; -import app.fedilab.android.activities.InstanceActivity; -import app.fedilab.android.activities.InstanceHealthActivity; import app.fedilab.android.activities.LoginActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.MastodonListActivity; -import app.fedilab.android.activities.PartnerShipActivity; -import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.activities.ProxyActivity; -import app.fedilab.android.activities.ReorderTimelinesActivity; -import app.fedilab.android.activities.ScheduledActivity; -import app.fedilab.android.activities.SearchResultTabActivity; -import app.fedilab.android.activities.SettingsActivity; -import app.fedilab.android.activities.SuggestionActivity; -import app.fedilab.android.activities.TrendsActivity; -import app.fedilab.android.activities.admin.AdminActionActivity; -import app.fedilab.android.broadcastreceiver.NetworkStateReceiver; -import app.fedilab.android.client.endpoints.MastodonAccountsService; -import app.fedilab.android.client.entities.api.Emoji; -import app.fedilab.android.client.entities.api.EmojiInstance; -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.api.Tag; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.BottomMenu; -import app.fedilab.android.client.entities.app.MutedAccounts; -import app.fedilab.android.client.entities.app.Pinned; -import app.fedilab.android.client.entities.app.PinnedTimeline; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityMainBinding; import app.fedilab.android.databinding.NavHeaderMainBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.PinnedTimelineHelper; -import app.fedilab.android.helper.PushHelper; -import app.fedilab.android.ui.drawer.AccountsSearchTopBarAdapter; -import app.fedilab.android.ui.drawer.TagSearchTopBarAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; -import app.fedilab.android.viewmodel.mastodon.InstancesVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; -import app.fedilab.android.viewmodel.mastodon.TopBarVM; +import app.fedilab.android.mastodon.activities.ActionActivity; +import app.fedilab.android.mastodon.activities.AnnouncementActivity; +import app.fedilab.android.mastodon.activities.BaseActivity; +import app.fedilab.android.mastodon.activities.CacheActivity; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.activities.DirectoryActivity; +import app.fedilab.android.mastodon.activities.DraftActivity; +import app.fedilab.android.mastodon.activities.FilterActivity; +import app.fedilab.android.mastodon.activities.FollowRequestActivity; +import app.fedilab.android.mastodon.activities.FollowedTagActivity; +import app.fedilab.android.mastodon.activities.InstanceActivity; +import app.fedilab.android.mastodon.activities.InstanceHealthActivity; +import app.fedilab.android.mastodon.activities.MastodonListActivity; +import app.fedilab.android.mastodon.activities.PartnerShipActivity; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.activities.ProxyActivity; +import app.fedilab.android.mastodon.activities.ReorderTimelinesActivity; +import app.fedilab.android.mastodon.activities.ScheduledActivity; +import app.fedilab.android.mastodon.activities.SearchResultTabActivity; +import app.fedilab.android.mastodon.activities.SettingsActivity; +import app.fedilab.android.mastodon.activities.SuggestionActivity; +import app.fedilab.android.mastodon.activities.TrendsActivity; +import app.fedilab.android.mastodon.activities.admin.AdminActionActivity; +import app.fedilab.android.mastodon.broadcastreceiver.NetworkStateReceiver; +import app.fedilab.android.mastodon.client.endpoints.MastodonAccountsService; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.EmojiInstance; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.client.entities.app.MutedAccounts; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.PinnedTimelineHelper; +import app.fedilab.android.mastodon.helper.PushHelper; +import app.fedilab.android.mastodon.ui.drawer.AccountsSearchTopBarAdapter; +import app.fedilab.android.mastodon.ui.drawer.TagSearchTopBarAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonConversation; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentNotificationContainer; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.InstancesVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TopBarVM; import es.dmoral.toasty.Toasty; import okhttp3.Call; import okhttp3.Callback; @@ -186,7 +186,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt public static status networkAvailable = UNKNOWN; public static Instance instanceInfo; public static List mainFilters; - public static List filteredAccounts; + public static List filteredAccounts; public static boolean filterFetched; public static boolean show_boosts, show_replies, show_dms, show_art_nsfw; public static String regex_home, regex_local, regex_public; @@ -615,10 +615,10 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt .client(okHttpClient) .build(); MastodonAccountsService mastodonAccountsService = retrofit.create(MastodonAccountsService.class); - retrofit2.Call accountCall = mastodonAccountsService.verify_credentials(MainActivity.currentToken); + retrofit2.Call accountCall = mastodonAccountsService.verify_credentials(MainActivity.currentToken); if (accountCall != null) { try { - retrofit2.Response accountResponse = accountCall.execute(); + retrofit2.Response accountResponse = accountCall.execute(); if (accountResponse.isSuccessful()) { currentAccount.mastodon_account = accountResponse.body(); } @@ -818,7 +818,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt binding.toolbarSearch.setSuggestionsAdapter(cursorAdapter); new Thread(() -> { int i = 0; - for (app.fedilab.android.client.entities.api.Account account : accounts) { + for (app.fedilab.android.mastodon.client.entities.api.Account account : accounts) { FutureTarget futureTarget = Glide .with(BaseMainActivity.this.getApplicationContext()) .load(account.avatar_static) @@ -1047,7 +1047,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } @Override - public void federatedAccount(app.fedilab.android.client.entities.api.Account account) { + public void federatedAccount(app.fedilab.android.mastodon.client.entities.api.Account account) { } }); @@ -1281,7 +1281,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } @Override - public void federatedAccount(app.fedilab.android.client.entities.api.Account account) { + public void federatedAccount(app.fedilab.android.mastodon.client.entities.api.Account account) { } }); } else {//It's an account @@ -1291,7 +1291,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } @Override - public void federatedAccount(app.fedilab.android.client.entities.api.Account account) { + public void federatedAccount(app.fedilab.android.mastodon.client.entities.api.Account account) { if (account != null) { Intent intent = new Intent(BaseMainActivity.this, ProfileActivity.class); Bundle b = new Bundle(); diff --git a/app/src/main/java/app/fedilab/android/MainApplication.java b/app/src/main/java/app/fedilab/android/MainApplication.java index a8841037..dd04feb8 100644 --- a/app/src/main/java/app/fedilab/android/MainApplication.java +++ b/app/src/main/java/app/fedilab/android/MainApplication.java @@ -33,7 +33,7 @@ import org.acra.config.DialogConfigurationBuilder; import org.acra.config.MailSenderConfigurationBuilder; import org.acra.data.StringFormat; -import app.fedilab.android.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; import es.dmoral.toasty.Toasty; @@ -42,6 +42,7 @@ public class MainApplication extends MultiDexApplication { private static MainApplication app; private WebView webView; + public static MainApplication getApp() { return app; } diff --git a/app/src/main/java/app/fedilab/android/activities/AboutActivity.java b/app/src/main/java/app/fedilab/android/activities/AboutActivity.java index 25965d47..78adc8ec 100644 --- a/app/src/main/java/app/fedilab/android/activities/AboutActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/AboutActivity.java @@ -31,13 +31,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.BuildConfig; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityAboutBinding; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.activities.BaseBarActivity; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class AboutActivity extends BaseBarActivity { 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 ee7d77df..7b5662da 100644 --- a/app/src/main/java/app/fedilab/android/activities/LoginActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/LoginActivity.java @@ -15,9 +15,6 @@ package app.fedilab.android.activities; * see . */ -import static app.fedilab.android.helper.Helper.PREF_USER_TOKEN; -import static app.fedilab.android.helper.MastodonHelper.REDIRECT_CONTENT_WEB; - import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; @@ -39,13 +36,16 @@ import java.util.regex.Matcher; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.login.FragmentLoginMain; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.AdminVM; -import app.fedilab.android.viewmodel.mastodon.OauthVM; +import app.fedilab.android.mastodon.activities.BaseActivity; +import app.fedilab.android.mastodon.activities.ProxyActivity; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.OauthVM; +import app.fedilab.android.ui.fragment.FragmentLoginMain; import es.dmoral.toasty.Toasty; @@ -69,7 +69,7 @@ public class LoginActivity extends BaseActivity { BaseMainActivity.api = Account.API.MASTODON; SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); SharedPreferences.Editor editor = sharedpreferences.edit(); - editor.putString(PREF_USER_TOKEN, account.token); + editor.putString(Helper.PREF_USER_TOKEN, account.token); editor.commit(); //The user is now authenticated, it will be redirected to MainActivity Runnable myRunnable = () -> { @@ -86,7 +86,7 @@ public class LoginActivity extends BaseActivity { private void manageItent(Intent intent) { - if (intent != null && intent.getData() != null && intent.getData().toString().contains(REDIRECT_CONTENT_WEB + "?code=")) { + if (intent != null && intent.getData() != null && intent.getData().toString().contains(MastodonHelper.REDIRECT_CONTENT_WEB + "?code=")) { String url = intent.getData().toString(); Matcher matcher = Helper.codePattern.matcher(url); if (!matcher.find()) { diff --git a/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/AccountReportActivity.java similarity index 96% rename from app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/AccountReportActivity.java index 384a7698..7fa2c4de 100644 --- a/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/AccountReportActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,14 +29,15 @@ import androidx.recyclerview.widget.LinearLayoutManager; import java.util.ArrayList; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminReport; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityAdminReportBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.StatusReportAdapter; -import app.fedilab.android.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReport; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.StatusReportAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; import es.dmoral.toasty.Toasty; public class AccountReportActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/ActionActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ActionActivity.java similarity index 93% rename from app/src/main/java/app/fedilab/android/activities/ActionActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ActionActivity.java index aab8386c..a943e6dd 100644 --- a/app/src/main/java/app/fedilab/android/activities/ActionActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ActionActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,13 +22,13 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import app.fedilab.android.R; -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; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonAccount; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonDomainBlock; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonAccount; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonDomainBlock; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; public class ActionActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/AnnouncementActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/AnnouncementActivity.java similarity index 90% rename from app/src/main/java/app/fedilab/android/activities/AnnouncementActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/AnnouncementActivity.java index 6197235f..da4891a3 100644 --- a/app/src/main/java/app/fedilab/android/activities/AnnouncementActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/AnnouncementActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -27,11 +27,11 @@ import androidx.appcompat.app.ActionBar; import androidx.preference.PreferenceManager; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.EmojiInstance; import app.fedilab.android.databinding.ActivityAnnouncementBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonAnnouncement; +import app.fedilab.android.mastodon.client.entities.api.EmojiInstance; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonAnnouncement; public class AnnouncementActivity extends BaseActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/BaseActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/BaseActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/BaseActivity.java index 87193a7c..33202d0a 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -34,8 +34,8 @@ import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; @SuppressLint("Registered") diff --git a/app/src/main/java/app/fedilab/android/activities/BaseAlertDialogActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseAlertDialogActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/BaseAlertDialogActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/BaseAlertDialogActivity.java index 734121bf..1ab5c897 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseAlertDialogActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseAlertDialogActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -34,8 +34,8 @@ import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; @SuppressLint("Registered") diff --git a/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseBarActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/BaseBarActivity.java index 156d81b8..cd70b928 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseBarActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseBarActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,8 +34,8 @@ import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; @SuppressLint("Registered") diff --git a/app/src/main/java/app/fedilab/android/activities/BaseFragmentActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseFragmentActivity.java similarity index 91% rename from app/src/main/java/app/fedilab/android/activities/BaseFragmentActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/BaseFragmentActivity.java index a4170406..30e158d2 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseFragmentActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseFragmentActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -21,7 +21,7 @@ import androidx.fragment.app.FragmentActivity; import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; @SuppressLint("Registered") diff --git a/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseTransparentActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/BaseTransparentActivity.java index 6b1c46f5..bc1a5087 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseTransparentActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/BaseTransparentActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,8 +34,8 @@ import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.one.EmojiOneProvider; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; @SuppressLint("Registered") diff --git a/app/src/main/java/app/fedilab/android/activities/CacheActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/CacheActivity.java similarity index 91% rename from app/src/main/java/app/fedilab/android/activities/CacheActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/CacheActivity.java index d08d8360..768322b9 100644 --- a/app/src/main/java/app/fedilab/android/activities/CacheActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/CacheActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,16 +33,16 @@ import java.util.List; import java.util.Locale; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.CacheAccount; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.databinding.ActivityCacheBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.CacheHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.CacheAdapter; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.CacheAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.CacheHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.CacheAdapter; public class CacheActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/ComposeActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java index a5380543..d4951d45 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ComposeActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -18,7 +18,6 @@ package app.fedilab.android.activities; import static app.fedilab.android.BaseMainActivity.currentAccount; import static app.fedilab.android.BaseMainActivity.currentInstance; import static app.fedilab.android.BaseMainActivity.emojis; -import static app.fedilab.android.ui.drawer.ComposeAdapter.prepareDraft; import android.Manifest; import android.annotation.SuppressLint; @@ -72,30 +71,32 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Context; -import app.fedilab.android.client.entities.api.EmojiInstance; -import app.fedilab.android.client.entities.api.Instance; -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.BaseAccount; -import app.fedilab.android.client.entities.app.StatusDraft; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityPaginationBinding; import app.fedilab.android.databinding.PopupContactBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.DividerDecorationSimple; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.MediaHelper; -import app.fedilab.android.interfaces.OnDownloadInterface; -import app.fedilab.android.jobs.ComposeWorker; -import app.fedilab.android.jobs.ScheduleThreadWorker; -import app.fedilab.android.services.ThreadMessageService; -import app.fedilab.android.ui.drawer.AccountsReplyAdapter; -import app.fedilab.android.ui.drawer.ComposeAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Context; +import app.fedilab.android.mastodon.client.entities.api.EmojiInstance; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.client.entities.api.Mention; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.DividerDecorationSimple; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.MediaHelper; +import app.fedilab.android.mastodon.interfaces.OnDownloadInterface; +import app.fedilab.android.mastodon.jobs.ComposeWorker; +import app.fedilab.android.mastodon.jobs.ScheduleThreadWorker; +import app.fedilab.android.mastodon.services.ThreadMessageService; +import app.fedilab.android.mastodon.ui.drawer.AccountsReplyAdapter; +import app.fedilab.android.mastodon.ui.drawer.ComposeAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; import es.dmoral.toasty.Toasty; public class ComposeActivity extends BaseActivity implements ComposeAdapter.ManageDrafts, AccountsReplyAdapter.ActionDone, ComposeAdapter.promptDraftListener { @@ -145,9 +146,9 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana private Uri photoFileUri; private ScheduledStatus scheduledStatus; private String visibility; - private app.fedilab.android.client.entities.api.Account accountMention; + private Account accountMention; private String statusReplyId; - private app.fedilab.android.client.entities.api.Account mentionBooster; + private Account mentionBooster; private String sharedSubject, sharedContent, sharedTitle, sharedDescription, shareURL, sharedUrlMedia; private String editMessageId; @@ -210,7 +211,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana private void storeDraftWarning() { if (statusDraft == null) { - statusDraft = prepareDraft(statusList, composeAdapter, account.instance, account.user_id); + statusDraft = ComposeAdapter.prepareDraft(statusList, composeAdapter, account.instance, account.user_id); } if (canBeSent(statusDraft)) { if (promptSaveDraft) { @@ -391,7 +392,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } } else if (item.getItemId() == R.id.action_schedule) { if (statusDraft == null) { - statusDraft = prepareDraft(statusList, composeAdapter, account.instance, account.user_id); + statusDraft = ComposeAdapter.prepareDraft(statusList, composeAdapter, account.instance, account.user_id); } if (canBeSent(statusDraft)) { MediaHelper.scheduleMessage(ComposeActivity.this, date -> storeDraft(true, date)); @@ -402,14 +403,14 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana return true; } - private void onRetrieveContact(PopupContactBinding popupContactBinding, List accounts) { + private void onRetrieveContact(PopupContactBinding popupContactBinding, List accounts) { popupContactBinding.loader.setVisibility(View.GONE); if (accounts == null) { accounts = new ArrayList<>(); } List checkedValues = new ArrayList<>(); - List contacts = new ArrayList<>(accounts); - for (app.fedilab.android.client.entities.api.Account account : contacts) { + List contacts = new ArrayList<>(accounts); + for (Account account : contacts) { checkedValues.add(composeAdapter.getLastComposeContent().contains("@" + account.acct)); } AccountsReplyAdapter contactAdapter = new AccountsReplyAdapter(contacts, checkedValues); @@ -480,8 +481,8 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } else if (visibility == null && currentAccount != null && currentAccount.mastodon_account != null && currentAccount.mastodon_account.source != null) { visibility = currentAccount.mastodon_account.source.privacy; } - mentionBooster = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_MENTION_BOOSTER); - accountMention = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION); + mentionBooster = (Account) b.getSerializable(Helper.ARG_MENTION_BOOSTER); + accountMention = (Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION); //Shared elements sharedAttachments = (ArrayList) b.getSerializable(Helper.ARG_MEDIA_ATTACHMENTS); sharedUrlMedia = b.getString(Helper.ARG_SHARE_URL_MEDIA); diff --git a/app/src/main/java/app/fedilab/android/activities/ContextActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java similarity index 93% rename from app/src/main/java/app/fedilab/android/activities/ContextActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java index 4f9da9a6..04679208 100644 --- a/app/src/main/java/app/fedilab/android/activities/ContextActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,7 +16,6 @@ package app.fedilab.android.activities; import static app.fedilab.android.BaseMainActivity.currentAccount; -import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; import android.content.Intent; import android.content.SharedPreferences; @@ -41,14 +40,16 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.client.entities.app.StatusCache; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityConversationBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonContext; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonContext; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; import es.dmoral.toasty.Toasty; public class ContextActivity extends BaseActivity implements FragmentMastodonContext.FirstMessage { @@ -114,7 +115,7 @@ public class ContextActivity extends BaseActivity implements FragmentMastodonCon new StatusCache(getApplication()).updateIfExists(statusCache); Handler mainHandler = new Handler(Looper.getMainLooper()); //Update UI - Runnable myRunnable = () -> sendAction(ContextActivity.this, Helper.ARG_STATUS_ACTION, status, null); + Runnable myRunnable = () -> StatusAdapter.sendAction(ContextActivity.this, Helper.ARG_STATUS_ACTION, status, null); mainHandler.post(myRunnable); } catch (DBException e) { e.printStackTrace(); diff --git a/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/CustomSharingActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/CustomSharingActivity.java index 50976049..05a4ee75 100644 --- a/app/src/main/java/app/fedilab/android/activities/CustomSharingActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/CustomSharingActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,15 +31,15 @@ import java.util.List; import java.util.Set; import app.fedilab.android.R; -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.customsharing.CustomSharingAsyncTask; -import app.fedilab.android.helper.customsharing.CustomSharingResponse; -import app.fedilab.android.helper.customsharing.OnCustomSharingInterface; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.customsharing.CustomSharingAsyncTask; +import app.fedilab.android.mastodon.helper.customsharing.CustomSharingResponse; +import app.fedilab.android.mastodon.helper.customsharing.OnCustomSharingInterface; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/DirectoryActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/DirectoryActivity.java similarity index 90% rename from app/src/main/java/app/fedilab/android/activities/DirectoryActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/DirectoryActivity.java index 1b68d213..8de5f446 100644 --- a/app/src/main/java/app/fedilab/android/activities/DirectoryActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/DirectoryActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,7 +14,7 @@ package app.fedilab.android.activities; * 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.app.Timeline.TimeLineEnum.ACCOUNT_DIRECTORY; +import static app.fedilab.android.mastodon.client.entities.app.Timeline.TimeLineEnum.ACCOUNT_DIRECTORY; import android.os.Bundle; import android.view.Menu; @@ -24,8 +24,8 @@ import org.jetbrains.annotations.NotNull; import app.fedilab.android.R; import app.fedilab.android.databinding.ActivityDirectoryBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonAccount; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonAccount; public class DirectoryActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/DraftActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/DraftActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/DraftActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/DraftActivity.java index d67d9c70..2ae1b7b0 100644 --- a/app/src/main/java/app/fedilab/android/activities/DraftActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/DraftActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -40,14 +40,14 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -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; -import app.fedilab.android.ui.drawer.StatusDraftAdapter; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.StatusDraftAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class DraftActivity extends BaseActivity implements StatusDraftAdapter.DraftActions { diff --git a/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/EditProfileActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/EditProfileActivity.java index 5463794a..a25a8c12 100644 --- a/app/src/main/java/app/fedilab/android/activities/EditProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/EditProfileActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -43,14 +43,14 @@ import java.util.Locale; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Field; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; import es.dmoral.toasty.Toasty; public class EditProfileActivity extends BaseBarActivity { @@ -208,7 +208,7 @@ public class EditProfileActivity extends BaseBarActivity { Helper.recreateMainActivity(EditProfileActivity.this); new Thread(() -> { try { - new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); + new app.fedilab.android.mastodon.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); } catch (DBException e) { e.printStackTrace(); } @@ -235,7 +235,7 @@ public class EditProfileActivity extends BaseBarActivity { currentAccount.mastodon_account = account; new Thread(() -> { try { - new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); + new app.fedilab.android.mastodon.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); } catch (DBException e) { e.printStackTrace(); } @@ -329,7 +329,7 @@ public class EditProfileActivity extends BaseBarActivity { currentAccount.mastodon_account = account; new Thread(() -> { try { - new app.fedilab.android.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); + new app.fedilab.android.mastodon.client.entities.app.Account(EditProfileActivity.this).insertOrUpdate(currentAccount); 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/mastodon/activities/FilterActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/FilterActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/FilterActivity.java index 48cc74c5..f38f50d9 100644 --- a/app/src/main/java/app/fedilab/android/activities/FilterActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/FilterActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -40,13 +40,14 @@ import java.util.Objects; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityFiltersBinding; import app.fedilab.android.databinding.PopupAddFilterBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.FilterAdapter; -import app.fedilab.android.ui.drawer.KeywordAdapter; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.FilterAdapter; +import app.fedilab.android.mastodon.ui.drawer.KeywordAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; public class FilterActivity extends BaseBarActivity implements FilterAdapter.Delete { @@ -236,7 +237,7 @@ public class FilterActivity extends BaseBarActivity implements FilterAdapter.Del alertDialog.setTitle(context.getString(R.string.action_update_filter)); alertDialog.setOnDismissListener(dialogInterface -> { //Hide keyboard - InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); + InputMethodManager imm = (InputMethodManager) context.getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(popupAddFilterBinding.addTitle.getWindowToken(), 0); }); if (alertDialog.getWindow() != null) { diff --git a/app/src/main/java/app/fedilab/android/activities/FollowRequestActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/FollowRequestActivity.java similarity index 93% rename from app/src/main/java/app/fedilab/android/activities/FollowRequestActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/FollowRequestActivity.java index 21a208ec..9eb6b8ec 100644 --- a/app/src/main/java/app/fedilab/android/activities/FollowRequestActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/FollowRequestActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,12 +29,12 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Accounts; import app.fedilab.android.databinding.ActivityStatusInfoBinding; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.AccountFollowRequestAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Accounts; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.AccountFollowRequestAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class FollowRequestActivity extends BaseActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/FollowedTagActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/FollowedTagActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/FollowedTagActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/FollowedTagActivity.java index 3f426bc1..5a9b8364 100644 --- a/app/src/main/java/app/fedilab/android/activities/FollowedTagActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/FollowedTagActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,15 +34,15 @@ import java.util.ArrayList; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityFollowedTagsBinding; import app.fedilab.android.databinding.PopupAddFollowedTagtBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.FollowedTagAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.TagVM; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.FollowedTagAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.TagVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/HashTagActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/HashTagActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/HashTagActivity.java index 65d40e32..fe6c2905 100644 --- a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/HashTagActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -37,20 +37,21 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Filter; -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.entities.app.Timeline; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityHashtagBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; -import app.fedilab.android.viewmodel.mastodon.ReorderVM; -import app.fedilab.android.viewmodel.mastodon.TagVM; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.TagTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.ReorderVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TagVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceActivity.java similarity index 87% rename from app/src/main/java/app/fedilab/android/activities/InstanceActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/InstanceActivity.java index 650d2782..ac1563e3 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -39,11 +39,12 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Instance; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityInstanceBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.InstancesVM; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.InstancesVM; public class InstanceActivity extends DialogFragment { @@ -77,17 +78,17 @@ public class InstanceActivity extends DialogFragment { binding.about.setOnClickListener(v -> Helper.openBrowser(requireActivity(), "https://" + MainActivity.currentInstance + "/about")); binding.privacy.setOnClickListener(v -> Helper.openBrowser(requireActivity(), "https://" + MainActivity.currentInstance + "/privacy-policy")); - binding.close.setOnClickListener( view -> { - if (applyMaxChar) { - String max_char = binding.maxChar.getText().toString(); - - SharedPreferences.Editor editor = sharedpreferences.edit(); - if (!max_char.isEmpty()) { - try { - editor.putInt(getString(R.string.SET_MAX_INSTANCE_CHAR) + MainActivity.currentInstance, Integer.parseInt(max_char)); - editor.apply(); - } catch (Exception ignored) { - } + binding.close.setOnClickListener(view -> { + if (applyMaxChar) { + String max_char = binding.maxChar.getText().toString(); + + SharedPreferences.Editor editor = sharedpreferences.edit(); + if (!max_char.isEmpty()) { + try { + editor.putInt(getString(R.string.SET_MAX_INSTANCE_CHAR) + MainActivity.currentInstance, Integer.parseInt(max_char)); + editor.apply(); + } catch (Exception ignored) { + } } } requireDialog().dismiss(); diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.kt b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt similarity index 72% rename from app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.kt rename to app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt index 7f921564..54241f99 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceHealthActivity.kt +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt @@ -1,4 +1,4 @@ -package app.fedilab.android.activities +package app.fedilab.android.mastodon.activities import android.app.Dialog import android.content.Intent @@ -12,11 +12,11 @@ import androidx.fragment.app.DialogFragment import androidx.lifecycle.ViewModelProvider import app.fedilab.android.BaseMainActivity import app.fedilab.android.R -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 -import app.fedilab.android.viewmodel.mastodon.InstanceSocialVM +import app.fedilab.android.mastodon.client.entities.app.InstanceSocial +import app.fedilab.android.mastodon.helper.Helper +import app.fedilab.android.mastodon.helper.ThemeHelper +import app.fedilab.android.mastodon.viewmodel.mastodon.InstanceSocialVM import com.bumptech.glide.Glide import com.google.android.material.dialog.MaterialAlertDialogBuilder @@ -59,11 +59,15 @@ class InstanceHealthActivity : DialogFragment() { } private fun checkInstance() { - val instanceSocialVM = ViewModelProvider(this@InstanceHealthActivity)[InstanceSocialVM::class.java] + val instanceSocialVM = + ViewModelProvider(this@InstanceHealthActivity)[InstanceSocialVM::class.java] instanceSocialVM.getInstances(BaseMainActivity.currentInstance.trim { it <= ' ' }) .observe(this@InstanceHealthActivity) { instanceSocialList: InstanceSocial? -> val instance = instanceSocialList?.instances?.firstOrNull { instance -> - instance.name.equals(BaseMainActivity.currentInstance.trim { it <= ' ' }, ignoreCase = true) + instance.name.equals( + BaseMainActivity.currentInstance.trim { it <= ' ' }, + ignoreCase = true + ) } if (instance != null) { instance.thumbnail?.takeIf { it != "null" }?.let { thumbnail -> @@ -76,15 +80,31 @@ class InstanceHealthActivity : DialogFragment() { binding.name.text = instance.name if (instance.up) { binding.up.setText(app.fedilab.android.R.string.is_up) - binding.up.setTextColor(ThemeHelper.getAttColor(requireContext(), app.fedilab.android.R.attr.colorPrimary)) + binding.up.setTextColor( + ThemeHelper.getAttColor( + requireContext(), + app.fedilab.android.R.attr.colorPrimary + ) + ) } else { binding.up.setText(app.fedilab.android.R.string.is_down) - binding.up.setTextColor(ThemeHelper.getAttColor(requireContext(), app.fedilab.android.R.attr.colorError)) + binding.up.setTextColor( + ThemeHelper.getAttColor( + requireContext(), + app.fedilab.android.R.attr.colorError + ) + ) } - binding.uptime.text = getString(app.fedilab.android.R.string.instance_health_uptime, instance.uptime * 100) + binding.uptime.text = getString( + app.fedilab.android.R.string.instance_health_uptime, + instance.uptime * 100 + ) if (instance.checked_at != null) binding.checkedAt.text = - getString(app.fedilab.android.R.string.instance_health_checkedat, Helper.dateToString(instance.checked_at)) + getString( + app.fedilab.android.R.string.instance_health_checkedat, + Helper.dateToString(instance.checked_at) + ) binding.values.text = getString( app.fedilab.android.R.string.instance_health_indication, instance.version, diff --git a/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceProfileActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/InstanceProfileActivity.java index 73847e8c..f823e76f 100644 --- a/app/src/main/java/app/fedilab/android/activities/InstanceProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceProfileActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,8 +29,8 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import app.fedilab.android.R; import app.fedilab.android.databinding.ActivityInstanceProfileBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; import es.dmoral.toasty.Toasty; public class InstanceProfileActivity extends DialogFragment { diff --git a/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java similarity index 96% rename from app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java index 12a55420..28134fb9 100644 --- a/app/src/main/java/app/fedilab/android/activities/MastodonListActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -42,23 +42,24 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.MastodonList; -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.activities.MainActivity; import app.fedilab.android.databinding.ActivityListBinding; import app.fedilab.android.databinding.PopupAddListBinding; import app.fedilab.android.databinding.PopupManageAccountsListBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.AccountListAdapter; -import app.fedilab.android.ui.drawer.MastodonListAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.ReorderVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.AccountListAdapter; +import app.fedilab.android.mastodon.ui.drawer.MastodonListAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.ReorderVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/MediaActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java similarity index 96% rename from app/src/main/java/app/fedilab/android/activities/MediaActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java index 32e4ec2a..8ca29890 100644 --- a/app/src/main/java/app/fedilab/android/activities/MediaActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,8 +14,6 @@ package app.fedilab.android.activities; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.ui.fragment.media.FragmentMediaProfile.mediaAttachmentProfile; - import android.Manifest; import android.app.DownloadManager; import android.content.BroadcastReceiver; @@ -49,14 +47,15 @@ import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityMediaPagerBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MediaHelper; -import app.fedilab.android.helper.TranslateHelper; -import app.fedilab.android.interfaces.OnDownloadInterface; -import app.fedilab.android.ui.fragment.media.FragmentMedia; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MediaHelper; +import app.fedilab.android.mastodon.helper.TranslateHelper; +import app.fedilab.android.mastodon.interfaces.OnDownloadInterface; +import app.fedilab.android.mastodon.ui.fragment.media.FragmentMedia; +import app.fedilab.android.mastodon.ui.fragment.media.FragmentMediaProfile; import es.dmoral.toasty.Toasty; @@ -72,7 +71,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload public void onReceive(Context context, Intent intent) { long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1); if (downloadID == id) { - DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); + DownloadManager manager = (DownloadManager) context.getSystemService(DOWNLOAD_SERVICE); assert manager != null; Uri uri = manager.getUriForDownloadedFile(downloadID); Intent shareIntent = new Intent(Intent.ACTION_SEND); @@ -118,9 +117,9 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload mediaFromProfile = b.getBoolean(Helper.ARG_MEDIA_ARRAY_PROFILE, false); status = (Status) b.getSerializable(Helper.ARG_STATUS); } - if (mediaFromProfile && mediaAttachmentProfile != null) { + if (mediaFromProfile && FragmentMediaProfile.mediaAttachmentProfile != null) { attachments = new ArrayList<>(); - attachments.addAll(mediaAttachmentProfile); + attachments.addAll(FragmentMediaProfile.mediaAttachmentProfile); } if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); diff --git a/app/src/main/java/app/fedilab/android/activities/PartnerShipActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/PartnerShipActivity.java similarity index 92% rename from app/src/main/java/app/fedilab/android/activities/PartnerShipActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/PartnerShipActivity.java index f525363c..c1dd4783 100644 --- a/app/src/main/java/app/fedilab/android/activities/PartnerShipActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/PartnerShipActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,13 +31,13 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityPartnershipBinding; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class PartnerShipActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/activities/ProfileActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java index 3011a772..944edf38 100644 --- a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -76,34 +76,35 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.FamiliarFollowers; -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.Languages; -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.client.entities.app.WellKnownNodeinfo; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityProfileBinding; import app.fedilab.android.databinding.NotificationsRelatedAccountsBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.SpannableHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.FieldAdapter; -import app.fedilab.android.ui.drawer.IdentityProofsAdapter; -import app.fedilab.android.ui.pageadapter.FedilabProfileTLPageAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; -import app.fedilab.android.viewmodel.mastodon.ReorderVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.FamiliarFollowers; +import app.fedilab.android.mastodon.client.entities.api.Field; +import app.fedilab.android.mastodon.client.entities.api.IdentityProof; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.app.Languages; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.RemoteInstance; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.client.entities.app.WellKnownNodeinfo; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.FieldAdapter; +import app.fedilab.android.mastodon.ui.drawer.IdentityProofsAdapter; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabProfileTLPageAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.ReorderVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/ProxyActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ProxyActivity.java similarity index 98% rename from app/src/main/java/app/fedilab/android/activities/ProxyActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ProxyActivity.java index 9c794470..b0d7e85e 100644 --- a/app/src/main/java/app/fedilab/android/activities/ProxyActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ProxyActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -16,7 +16,6 @@ package app.fedilab.android.activities; import android.app.Dialog; -import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ReorderTimelinesActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ReorderTimelinesActivity.java index a0d09793..e4f6e5f6 100644 --- a/app/src/main/java/app/fedilab/android/activities/ReorderTimelinesActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ReorderTimelinesActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -15,9 +15,6 @@ package app.fedilab.android.activities; * see . */ -import static app.fedilab.android.helper.PinnedTimelineHelper.sortMenuItem; -import static app.fedilab.android.helper.PinnedTimelineHelper.sortPositionAsc; - import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; @@ -47,22 +44,23 @@ import java.util.ArrayList; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -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; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.itemtouchhelper.OnStartDragListener; -import app.fedilab.android.helper.itemtouchhelper.SimpleItemTouchHelperCallback; -import app.fedilab.android.ui.drawer.ReorderBottomMenuAdapter; -import app.fedilab.android.ui.drawer.ReorderTabAdapter; -import app.fedilab.android.viewmodel.mastodon.InstanceSocialVM; -import app.fedilab.android.viewmodel.mastodon.ReorderVM; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.client.entities.app.InstanceSocial; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.RemoteInstance; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.PinnedTimelineHelper; +import app.fedilab.android.mastodon.helper.itemtouchhelper.OnStartDragListener; +import app.fedilab.android.mastodon.helper.itemtouchhelper.SimpleItemTouchHelperCallback; +import app.fedilab.android.mastodon.ui.drawer.ReorderBottomMenuAdapter; +import app.fedilab.android.mastodon.ui.drawer.ReorderTabAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.InstanceSocialVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.ReorderVM; import es.dmoral.toasty.Toasty; import okhttp3.Call; import okhttp3.Callback; @@ -125,7 +123,7 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart this.pinned.pinnedTimelines = new ArrayList<>(); update = false; } - sortPositionAsc(this.pinned.pinnedTimelines); + PinnedTimelineHelper.sortPositionAsc(this.pinned.pinnedTimelines); reorderTabAdapter = new ReorderTabAdapter(this.pinned, ReorderTimelinesActivity.this); ItemTouchHelper.Callback callback = new SimpleItemTouchHelperCallback(reorderTabAdapter); @@ -141,7 +139,7 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart this.bottomMenu = new BottomMenu(getApplicationContext()).defaultBottomMenu(); this.bottomMenu.bottom_menu = new ArrayList<>(); } - sortMenuItem(this.bottomMenu.bottom_menu); + PinnedTimelineHelper.sortMenuItem(this.bottomMenu.bottom_menu); reorderBottomMenuAdapter = new ReorderBottomMenuAdapter(this.bottomMenu, ReorderTimelinesActivity.this); ItemTouchHelper.Callback callback = new SimpleItemTouchHelperCallback(reorderBottomMenuAdapter); diff --git a/app/src/main/java/app/fedilab/android/activities/ReportActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ReportActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/ReportActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ReportActivity.java index c2866a0c..aa8dcfc1 100644 --- a/app/src/main/java/app/fedilab/android/activities/ReportActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ReportActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,15 +31,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.ui.drawer.RulesAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.RulesAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/ScheduledActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ScheduledActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/ScheduledActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/ScheduledActivity.java index 15b82002..c072bee2 100644 --- a/app/src/main/java/app/fedilab/android/activities/ScheduledActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ScheduledActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,8 +29,8 @@ import com.google.android.material.tabs.TabLayout; import app.fedilab.android.R; import app.fedilab.android.databinding.ActivityScheduledBinding; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.pageadapter.FedilabScheduledPageAdapter; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabScheduledPageAdapter; public class ScheduledActivity extends BaseActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/SearchResultTabActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/SearchResultTabActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java index 0f9c732a..08bb89dc 100644 --- a/app/src/main/java/app/fedilab/android/activities/SearchResultTabActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -50,16 +50,17 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.ActivitySearchResultTabsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.AccountsSearchTopBarAdapter; -import app.fedilab.android.ui.drawer.TagSearchTopBarAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonAccount; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTag; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.AccountsSearchTopBarAdapter; +import app.fedilab.android.mastodon.ui.drawer.TagSearchTopBarAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonAccount; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTag; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; import es.dmoral.toasty.Toasty; @@ -185,7 +186,7 @@ public class SearchResultTabActivity extends BaseBarActivity { searchView.setSuggestionsAdapter(cursorAdapter); new Thread(() -> { int i = 0; - for (app.fedilab.android.client.entities.api.Account account : accounts) { + for (Account account : accounts) { FutureTarget futureTarget = Glide .with(SearchResultTabActivity.this.getApplicationContext()) .load(account.avatar_static) diff --git a/app/src/main/java/app/fedilab/android/activities/SettingsActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/SettingsActivity.java similarity index 98% rename from app/src/main/java/app/fedilab/android/activities/SettingsActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/SettingsActivity.java index a7eac52c..eb8f5b84 100644 --- a/app/src/main/java/app/fedilab/android/activities/SettingsActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/SettingsActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/activities/StatusHistoryActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/StatusHistoryActivity.java similarity index 90% rename from app/src/main/java/app/fedilab/android/activities/StatusHistoryActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/StatusHistoryActivity.java index 9f40e6bd..183c8f5d 100644 --- a/app/src/main/java/app/fedilab/android/activities/StatusHistoryActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/StatusHistoryActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -23,10 +23,11 @@ import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.LinearLayoutManager; import app.fedilab.android.R; +import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.ActivityStatusHistoryBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.StatusHistoryAdapter; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.StatusHistoryAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/StatusInfoActivity.java similarity index 92% rename from app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/StatusInfoActivity.java index dc7047a0..5cb65cd4 100644 --- a/app/src/main/java/app/fedilab/android/activities/StatusInfoActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/StatusInfoActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -29,15 +29,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Accounts; -import app.fedilab.android.client.entities.api.RelationShip; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.ActivityStatusInfoBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.AccountAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Accounts; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.AccountAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class StatusInfoActivity extends BaseActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/SuggestionActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/SuggestionActivity.java similarity index 90% rename from app/src/main/java/app/fedilab/android/activities/SuggestionActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/SuggestionActivity.java index 0a7b1eee..46d5ae69 100644 --- a/app/src/main/java/app/fedilab/android/activities/SuggestionActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/SuggestionActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -21,8 +21,8 @@ import org.jetbrains.annotations.NotNull; import app.fedilab.android.R; import app.fedilab.android.databinding.ActivitySuggestionsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonSuggestion; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonSuggestion; public class SuggestionActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/TrendsActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/TrendsActivity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/activities/TrendsActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/TrendsActivity.java index d23aa463..6473a407 100644 --- a/app/src/main/java/app/fedilab/android/activities/TrendsActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/TrendsActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities; +package app.fedilab.android.mastodon.activities; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -30,11 +30,11 @@ import com.google.android.material.tabs.TabLayout; import org.jetbrains.annotations.NotNull; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityTrendsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTag; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTag; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; public class TrendsActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/admin/AdminAccountActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/admin/AdminAccountActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java index 0b161768..04074ea4 100644 --- a/app/src/main/java/app/fedilab/android/activities/admin/AdminAccountActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities.admin; +package app.fedilab.android.mastodon.activities.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -53,20 +53,20 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.BaseActivity; -import app.fedilab.android.activities.InstanceProfileActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminIp; import app.fedilab.android.databinding.ActivityAdminAccountBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.SpannableHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.AdminVM; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.activities.BaseActivity; +import app.fedilab.android.mastodon.activities.InstanceProfileActivity; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminIp; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/activities/admin/AdminActionActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminActionActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/admin/AdminActionActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminActionActivity.java index 3166833e..0193e7ff 100644 --- a/app/src/main/java/app/fedilab/android/activities/admin/AdminActionActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminActionActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities.admin; +package app.fedilab.android.mastodon.activities.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,9 +14,9 @@ package app.fedilab.android.activities.admin; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.activities.admin.AdminActionActivity.AdminEnum.ACCOUNT; -import static app.fedilab.android.activities.admin.AdminActionActivity.AdminEnum.DOMAIN; -import static app.fedilab.android.activities.admin.AdminActionActivity.AdminEnum.REPORT; +import static app.fedilab.android.mastodon.activities.admin.AdminActionActivity.AdminEnum.ACCOUNT; +import static app.fedilab.android.mastodon.activities.admin.AdminActionActivity.AdminEnum.DOMAIN; +import static app.fedilab.android.mastodon.activities.admin.AdminActionActivity.AdminEnum.REPORT; import android.content.BroadcastReceiver; import android.content.Context; @@ -37,16 +37,16 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.gson.annotations.SerializedName; import app.fedilab.android.R; -import app.fedilab.android.activities.BaseBarActivity; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; import app.fedilab.android.databinding.ActivityAdminActionsBinding; import app.fedilab.android.databinding.PopupAdminFilterAccountsBinding; import app.fedilab.android.databinding.PopupAdminFilterReportsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.fragment.admin.FragmentAdminAccount; -import app.fedilab.android.ui.fragment.admin.FragmentAdminDomain; -import app.fedilab.android.ui.fragment.admin.FragmentAdminReport; +import app.fedilab.android.mastodon.activities.BaseBarActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.fragment.admin.FragmentAdminAccount; +import app.fedilab.android.mastodon.ui.fragment.admin.FragmentAdminDomain; +import app.fedilab.android.mastodon.ui.fragment.admin.FragmentAdminReport; public class AdminActionActivity extends BaseBarActivity { diff --git a/app/src/main/java/app/fedilab/android/activities/admin/AdminDomainBlockActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminDomainBlockActivity.java similarity index 91% rename from app/src/main/java/app/fedilab/android/activities/admin/AdminDomainBlockActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminDomainBlockActivity.java index 6d21b127..0bdbba06 100644 --- a/app/src/main/java/app/fedilab/android/activities/admin/AdminDomainBlockActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminDomainBlockActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities.admin; +package app.fedilab.android.mastodon.activities.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -15,8 +15,6 @@ package app.fedilab.android.activities.admin; * see . */ -import static app.fedilab.android.helper.Helper.BROADCAST_DATA; - import android.content.Intent; import android.os.Bundle; import android.view.Menu; @@ -33,12 +31,12 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import app.fedilab.android.R; -import app.fedilab.android.activities.BaseBarActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; import app.fedilab.android.databinding.ActivityAdminDomainblockBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.activities.BaseBarActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; import es.dmoral.toasty.Toasty; public class AdminDomainBlockActivity extends BaseBarActivity { @@ -109,7 +107,7 @@ public class AdminDomainBlockActivity extends BaseBarActivity { } else { Toasty.error(AdminDomainBlockActivity.this, getString(R.string.toast_error), Toasty.LENGTH_SHORT).show(); } - Intent intent = new Intent(BROADCAST_DATA).putExtra(Helper.ARG_ADMIN_DOMAINBLOCK, adminDomainBlockResult); + Intent intent = new Intent(Helper.BROADCAST_DATA).putExtra(Helper.ARG_ADMIN_DOMAINBLOCK, adminDomainBlockResult); LocalBroadcastManager.getInstance(AdminDomainBlockActivity.this).sendBroadcast(intent); finish(); } @@ -137,7 +135,7 @@ public class AdminDomainBlockActivity extends BaseBarActivity { .setPositiveButton(R.string.unblock_domain, (dialog, which) -> { adminVM.deleteDomain(MainActivity.currentInstance, MainActivity.currentToken, adminDomainBlock.id) .observe(AdminDomainBlockActivity.this, adminDomainBlockResult -> { - Intent intent = new Intent(BROADCAST_DATA).putExtra(Helper.ARG_ADMIN_DOMAINBLOCK_DELETE, adminDomainBlock); + Intent intent = new Intent(Helper.BROADCAST_DATA).putExtra(Helper.ARG_ADMIN_DOMAINBLOCK_DELETE, adminDomainBlock); LocalBroadcastManager.getInstance(AdminDomainBlockActivity.this).sendBroadcast(intent); finish(); } diff --git a/app/src/main/java/app/fedilab/android/activities/admin/AdminReportActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java similarity index 95% rename from app/src/main/java/app/fedilab/android/activities/admin/AdminReportActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java index 35a85d1c..f5d79bb8 100644 --- a/app/src/main/java/app/fedilab/android/activities/admin/AdminReportActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.activities.admin; +package app.fedilab.android.mastodon.activities.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -54,20 +54,20 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.BaseBarActivity; -import app.fedilab.android.activities.InstanceProfileActivity; -import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminIp; import app.fedilab.android.databinding.ActivityAdminAccountBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.SpannableHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.AdminVM; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.activities.BaseBarActivity; +import app.fedilab.android.mastodon.activities.InstanceProfileActivity; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminIp; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/broadcastreceiver/NetworkStateReceiver.java b/app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/NetworkStateReceiver.java similarity index 97% rename from app/src/main/java/app/fedilab/android/broadcastreceiver/NetworkStateReceiver.java rename to app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/NetworkStateReceiver.java index 20185de2..0f2f198b 100644 --- a/app/src/main/java/app/fedilab/android/broadcastreceiver/NetworkStateReceiver.java +++ b/app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/NetworkStateReceiver.java @@ -1,4 +1,4 @@ -package app.fedilab.android.broadcastreceiver; +package app.fedilab.android.mastodon.broadcastreceiver; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/broadcastreceiver/ToastMessage.java b/app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/ToastMessage.java similarity index 83% rename from app/src/main/java/app/fedilab/android/broadcastreceiver/ToastMessage.java rename to app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/ToastMessage.java index 65e67352..4c8a679b 100644 --- a/app/src/main/java/app/fedilab/android/broadcastreceiver/ToastMessage.java +++ b/app/src/main/java/app/fedilab/android/mastodon/broadcastreceiver/ToastMessage.java @@ -1,4 +1,4 @@ -package app.fedilab.android.broadcastreceiver; +package app.fedilab.android.mastodon.broadcastreceiver; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -14,15 +14,12 @@ package app.fedilab.android.broadcastreceiver; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.helper.Helper.RECEIVE_TOAST_CONTENT; -import static app.fedilab.android.helper.Helper.RECEIVE_TOAST_TYPE; - import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; import es.dmoral.toasty.Toasty; public class ToastMessage extends BroadcastReceiver { @@ -30,8 +27,8 @@ public class ToastMessage extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { Bundle b = intent.getExtras(); if (b != null) { - String type = b.getString(RECEIVE_TOAST_TYPE, null); - String content = b.getString(RECEIVE_TOAST_CONTENT, null); + String type = b.getString(Helper.RECEIVE_TOAST_TYPE, null); + String content = b.getString(Helper.RECEIVE_TOAST_CONTENT, null); if (type != null && content != null) { switch (type) { case Helper.RECEIVE_TOAST_TYPE_ERROR: diff --git a/app/src/main/java/app/fedilab/android/client/NodeInfoService.java b/app/src/main/java/app/fedilab/android/mastodon/client/NodeInfoService.java similarity index 89% rename from app/src/main/java/app/fedilab/android/client/NodeInfoService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/NodeInfoService.java index 4da1a61e..494da0e7 100644 --- a/app/src/main/java/app/fedilab/android/client/NodeInfoService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/NodeInfoService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client; +package app.fedilab.android.mastodon.client; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.client; * see . */ -import app.fedilab.android.client.entities.app.WellKnownNodeinfo; +import app.fedilab.android.mastodon.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/endpoints/JoinMastodonService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/JoinMastodonService.java similarity index 88% rename from app/src/main/java/app/fedilab/android/client/endpoints/JoinMastodonService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/JoinMastodonService.java index b251b74f..6a7735ea 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/JoinMastodonService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/JoinMastodonService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.JoinMastodonInstance; +import app.fedilab.android.mastodon.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/endpoints/MastodonAccountsService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAccountsService.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonAccountsService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAccountsService.java index 7d2eb2fd..35349307 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAccountsService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAccountsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,18 +17,18 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.FamiliarFollowers; -import app.fedilab.android.client.entities.api.FeaturedTag; -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.Suggestion; -import app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.client.entities.api.Token; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.FamiliarFollowers; +import app.fedilab.android.mastodon.client.entities.api.FeaturedTag; +import app.fedilab.android.mastodon.client.entities.api.IdentityProof; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.Preferences; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.api.Report; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Suggestion; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.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/endpoints/MastodonAdminService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAdminService.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonAdminService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAdminService.java index eeacfde6..fc5004db 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAdminService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAdminService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,9 +17,9 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; -import app.fedilab.android.client.entities.api.admin.AdminReport; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReport; import retrofit2.Call; import retrofit2.http.DELETE; import retrofit2.http.Field; diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAnnouncementsService.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAnnouncementsService.java index 1ce3a2e6..83b7df08 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAnnouncementsService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAnnouncementsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.Announcement; +import app.fedilab.android.mastodon.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/endpoints/MastodonAppsService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAppsService.java similarity index 91% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonAppsService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAppsService.java index d3e1636b..e23743c2 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonAppsService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonAppsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,8 +15,8 @@ package app.fedilab.android.client.endpoints; * see . */ -import app.fedilab.android.client.entities.api.App; -import app.fedilab.android.client.entities.api.Token; +import app.fedilab.android.mastodon.client.entities.api.App; +import app.fedilab.android.mastodon.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/endpoints/MastodonFiltersService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonFiltersService.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonFiltersService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonFiltersService.java index 8a438bbc..4415eab8 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonFiltersService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonFiltersService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.Filter; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.DELETE; diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonInstanceService.java similarity index 78% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonInstanceService.java index e87ed392..b0ee3d5b 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonInstanceService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonInstanceService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,11 +17,11 @@ package app.fedilab.android.client.endpoints; import java.util.List; -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 app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Activity; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.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/endpoints/MastodonNotificationsService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonNotificationsService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonNotificationsService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonNotificationsService.java index 898359fb..214e9093 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonNotificationsService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonNotificationsService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,8 +16,8 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.Notification; -import app.fedilab.android.client.entities.api.PushSubscription; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.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/endpoints/MastodonOembedService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonOembedService.java similarity index 89% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonOembedService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonOembedService.java index 53a51d2b..e669fa3f 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonOembedService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonOembedService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.client.endpoints; * see . */ -import app.fedilab.android.client.entities.api.Oembed; +import app.fedilab.android.mastodon.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/endpoints/MastodonSearchService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonSearchService.java similarity index 92% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonSearchService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonSearchService.java index 6c7768a8..b16f2966 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonSearchService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonSearchService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.client.endpoints; * see . */ -import app.fedilab.android.client.entities.api.Results; +import app.fedilab.android.mastodon.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/endpoints/MastodonStatusesService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonStatusesService.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonStatusesService.java index 7ecb050f..29d5c784 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonStatusesService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,14 +17,14 @@ package app.fedilab.android.client.endpoints; import java.util.Date; import java.util.List; -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 app.fedilab.android.client.entities.api.StatusSource; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Card; +import app.fedilab.android.mastodon.client.entities.api.Context; +import app.fedilab.android.mastodon.client.entities.api.Poll; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.StatusSource; import okhttp3.MultipartBody; import okhttp3.RequestBody; import retrofit2.Call; diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTagService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTagService.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonTagService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTagService.java index a3f6e466..caff8118 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTagService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTagService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.endpoints; import java.util.List; -import app.fedilab.android.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.api.Tag; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Header; diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTimelinesService.java similarity index 92% rename from app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTimelinesService.java index a2c953db..3a014da0 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonTimelinesService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,15 +16,15 @@ package app.fedilab.android.client.endpoints; import java.util.List; -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 app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.client.entities.misskey.MisskeyNote; -import app.fedilab.android.client.entities.nitter.Nitter; -import app.fedilab.android.client.entities.peertube.PeertubeVideo; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Conversation; +import app.fedilab.android.mastodon.client.entities.api.Marker; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.misskey.MisskeyNote; +import app.fedilab.android.mastodon.client.entities.nitter.Nitter; +import app.fedilab.android.mastodon.client.entities.peertube.PeertubeVideo; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.DELETE; diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/PleromaAPI.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/PleromaAPI.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/endpoints/PleromaAPI.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/PleromaAPI.java index d1309bb2..91948b02 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/PleromaAPI.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/PleromaAPI.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/ProgressRequestBody.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java rename to app/src/main/java/app/fedilab/android/mastodon/client/endpoints/ProgressRequestBody.java index c9f00d81..114623be 100644 --- a/app/src/main/java/app/fedilab/android/client/endpoints/ProgressRequestBody.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/endpoints/ProgressRequestBody.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.endpoints; +package app.fedilab.android.mastodon.client.endpoints; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Account.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/api/Account.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java index 36667aa8..cc0ce867 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Account.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -29,7 +29,7 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.List; -import app.fedilab.android.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; public class Account implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Accounts.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Accounts.java index 80504450..c7550a3f 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Accounts.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Accounts.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Activity.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Activity.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Activity.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Activity.java index 4e64ce09..01bc96f3 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Activity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Activity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Announcement.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Announcement.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java index 8bf18863..682eeb8b 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Announcement.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -24,7 +24,7 @@ import java.lang.ref.WeakReference; import java.util.Date; import java.util.List; -import app.fedilab.android.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; public class Announcement { @SerializedName("id") diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/App.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/App.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/App.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/App.java index b6a611f7..1e725a9b 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/App.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/App.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Attachment.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Attachment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Attachment.java index 5db92867..ba06b669 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Attachment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -56,6 +56,16 @@ public class Attachment implements Serializable { public String translation = null; public transient Status status = null; + @Override + public boolean equals(@Nullable Object obj) { + boolean same = false; + if (obj instanceof Attachment && ((Attachment) obj).id != null && this.id != null) { + same = this.id.equals(((Attachment) obj).id); + return same; + } else return super.equals(obj); + + } + public static class Meta implements Serializable { @SerializedName("focus") public Focus focus; @@ -83,15 +93,4 @@ public class Attachment implements Serializable { public float aspect; } - - @Override - public boolean equals(@Nullable Object obj) { - boolean same = false; - if (obj instanceof Attachment && ((Attachment) obj).id != null && this.id != null) { - same = this.id.equals(((Attachment) obj).id); - return same; - } else return super.equals(obj); - - } - } diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Card.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Card.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/Card.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Card.java index 049eb53a..d10e61e4 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Card.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Card.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Context.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Context.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Context.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Context.java index 269237cd..b008d8ec 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Context.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Context.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Conversation.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversation.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/Conversation.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversation.java index d8cd609f..f350cb11 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Conversation.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversation.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import androidx.annotation.Nullable; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversations.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversations.java index e7e54ab4..7e140e7a 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Conversations.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Conversations.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Domains.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Domains.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Domains.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Domains.java index cbcb63c3..a8e790d8 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Domains.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Domains.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Emoji.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Emoji.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/Emoji.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Emoji.java index 1abe3a28..b64b8566 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Emoji.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Emoji.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/EmojiInstance.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/EmojiInstance.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/api/EmojiInstance.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/EmojiInstance.java index 9338d09c..71955a3d 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/EmojiInstance.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/EmojiInstance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -27,7 +27,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.exception.DBException; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Error.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Error.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Error.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Error.java index a8b1d7dd..25557aab 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Error.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Error.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/FamiliarFollowers.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FamiliarFollowers.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/FamiliarFollowers.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FamiliarFollowers.java index 1d753c55..a52048e4 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/FamiliarFollowers.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FamiliarFollowers.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/FeaturedTag.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FeaturedTag.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/FeaturedTag.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FeaturedTag.java index ea57985c..344ebf84 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/FeaturedTag.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/FeaturedTag.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Field.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/Field.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java index f038740e..6c24c0ea 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Field.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,7 +28,7 @@ import java.lang.ref.WeakReference; import java.util.Date; import app.fedilab.android.R; -import app.fedilab.android.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; public class Field implements Serializable { @SerializedName("name") diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Filter.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Filter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/api/Filter.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Filter.java index 5275d346..349994ba 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Filter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Filter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/History.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/History.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/History.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/History.java index 321dafd3..dd4b3d19 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/History.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/History.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/IdentityProof.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/IdentityProof.java index 0d87ca7e..ebb24be1 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/IdentityProof.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/IdentityProof.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Instance.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Instance.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/api/Instance.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Instance.java index 551b1031..880b4319 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Instance.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Instance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/InstanceInfo.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/InstanceInfo.java index c290c7e7..b4c65ecd 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/InstanceInfo.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/InstanceInfo.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.exception.DBException; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/JoinMastodonInstance.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/JoinMastodonInstance.java index e198b621..a5dc0194 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/JoinMastodonInstance.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/JoinMastodonInstance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Marker.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Marker.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/Marker.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Marker.java index 8b74fa49..458dd956 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Marker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Marker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/MastodonList.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/MastodonList.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/MastodonList.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/MastodonList.java index 1491b35f..79c60d50 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/MastodonList.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/MastodonList.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Mention.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Mention.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Mention.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Mention.java index e4c07cf7..cc974616 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Mention.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Mention.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Notification.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notification.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/api/Notification.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notification.java index 52d5e4e7..e5c42ec2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Notification.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notification.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Notifications.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notifications.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Notifications.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notifications.java index 31e1b5aa..86ba4e10 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Notifications.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Notifications.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Oembed.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Oembed.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/Oembed.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Oembed.java index a2d340ec..30f03e4f 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Oembed.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Oembed.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Pagination.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pagination.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Pagination.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pagination.java index 3e36371a..e2ac4b77 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Pagination.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pagination.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Pleroma.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pleroma.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Pleroma.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pleroma.java index bee1912b..4b806c8c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Pleroma.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Pleroma.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Poll.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Poll.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Poll.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Poll.java index 98b161a9..ec5a37db 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Poll.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Poll.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -25,7 +25,7 @@ import java.lang.ref.WeakReference; import java.util.Date; import java.util.List; -import app.fedilab.android.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; public class Poll implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Preferences.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Preferences.java index 62143630..5e0a4449 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Preferences.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Preferences.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/PushSubscription.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/PushSubscription.java index c093b8be..0f421528 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/PushSubscription.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/PushSubscription.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Reaction.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Reaction.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/Reaction.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Reaction.java index 028f93ef..09d5fbb6 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Reaction.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Reaction.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/RelationShip.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/RelationShip.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/RelationShip.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/RelationShip.java index fbfa9322..035b57d9 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/RelationShip.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/RelationShip.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Report.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Report.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/api/Report.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Report.java index db86304a..00515cc7 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Report.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Report.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Results.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Results.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Results.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Results.java index 60fc77d9..1ee972d9 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Results.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Results.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/ScheduledStatus.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatus.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatus.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatus.java index d7db4b8f..12e12e5c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatus.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatus.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/ScheduledStatuses.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatuses.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatuses.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatuses.java index 97d9f771..7fa0fe43 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/ScheduledStatuses.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/ScheduledStatuses.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Source.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Source.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/Source.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Source.java index 63a53989..6702f815 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Source.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Source.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Status.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/api/Status.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java index b94cfbdc..dd16a00a 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Status.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,7 +28,7 @@ import java.lang.ref.WeakReference; import java.util.Date; import java.util.List; -import app.fedilab.android.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; public class Status implements Serializable, Cloneable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/StatusSource.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/StatusSource.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/StatusSource.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/StatusSource.java index 116ed6d0..a76a000c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/StatusSource.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/StatusSource.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Statuses.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Statuses.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Statuses.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Statuses.java index b3b3f949..ef56f40c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Statuses.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Statuses.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Suggestion.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestion.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Suggestion.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestion.java index d60128dd..8b3fe4d7 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Suggestion.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestion.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.client.entities.api; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Suggestions.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestions.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Suggestions.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestions.java index 1b29d7f6..50e13de0 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Suggestions.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Suggestions.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Tag.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tag.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/Tag.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tag.java index 4b48a311..4bc053f9 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Tag.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tag.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/Tags.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tags.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/Tags.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tags.java index 963bfae1..2af69a34 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Tags.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Tags.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/entities/api/Token.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Token.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/Token.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Token.java index a0357acf..148b422f 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Token.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Token.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api; +package app.fedilab.android.mastodon.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/api/admin/AdminAccount.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccount.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminAccount.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccount.java index 070f91e3..ccd9a85c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminAccount.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -21,7 +21,7 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.List; -import app.fedilab.android.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Account; public class AdminAccount implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminAccounts.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccounts.java similarity index 86% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminAccounts.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccounts.java index 02fc4b82..454361e0 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminAccounts.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminAccounts.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.entities.api.admin; import java.util.List; -import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Pagination; public class AdminAccounts { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlock.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlock.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlock.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlock.java index e25b9b15..cd995d33 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlock.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlock.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlocks.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlocks.java similarity index 86% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlocks.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlocks.java index 451da28d..67035433 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminDomainBlocks.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminDomainBlocks.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.entities.api.admin; import java.util.List; -import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Pagination; public class AdminDomainBlocks { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminEmailDomainBlock.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminEmailDomainBlock.java similarity index 89% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminEmailDomainBlock.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminEmailDomainBlock.java index e72e649b..7461320a 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminEmailDomainBlock.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminEmailDomainBlock.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -21,7 +21,7 @@ import java.io.Serializable; import java.util.Date; import java.util.List; -import app.fedilab.android.client.entities.api.History; +import app.fedilab.android.mastodon.client.entities.api.History; public class AdminEmailDomainBlock implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIp.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIp.java similarity index 93% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIp.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIp.java index 9962b481..4eeaaffb 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIp.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIp.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIpBlock.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIpBlock.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIpBlock.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIpBlock.java index 24d1af15..29940fb3 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminIpBlock.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminIpBlock.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminMeasure.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminMeasure.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminMeasure.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminMeasure.java index 6e33b2d8..1e076605 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminMeasure.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminMeasure.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReport.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReport.java similarity index 90% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReport.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReport.java index 988ace1b..658f63c2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReport.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReport.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -20,8 +20,8 @@ import java.io.Serializable; import java.util.Date; import java.util.List; -import app.fedilab.android.client.entities.api.Instance; -import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.client.entities.api.Status; public class AdminReport implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReports.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReports.java similarity index 86% rename from app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReports.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReports.java index e6b61481..bb9dd33c 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/admin/AdminReports.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/admin/AdminReports.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.api.admin; +package app.fedilab.android.mastodon.client.entities.api.admin; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -17,7 +17,7 @@ package app.fedilab.android.client.entities.api.admin; import java.util.List; -import app.fedilab.android.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Pagination; public class AdminReports { diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/Account.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Account.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/app/Account.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Account.java index 090c1b3d..e8ec3ecd 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/Account.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Account.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -27,8 +27,8 @@ import java.util.Date; import java.util.List; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import app.fedilab.android.sqlite.Sqlite; /** @@ -59,7 +59,7 @@ public class Account extends BaseAccount implements Serializable { * @param mastodon_account {@link BaseAccount} to serialize * @return String serialized account */ - public static String mastodonAccountToStringStorage(app.fedilab.android.client.entities.api.Account mastodon_account) { + public static String mastodonAccountToStringStorage(app.fedilab.android.mastodon.client.entities.api.Account mastodon_account) { Gson gson = new Gson(); try { return gson.toJson(mastodon_account); @@ -72,12 +72,12 @@ public class Account extends BaseAccount implements Serializable { * Unserialized a Mastodon BaseAccount * * @param serializedAccount String serialized account - * @return {@link app.fedilab.android.client.entities.api.Account} + * @return {@link app.fedilab.android.mastodon.client.entities.api.Account} */ - public static app.fedilab.android.client.entities.api.Account restoreAccountFromString(String serializedAccount) { + public static app.fedilab.android.mastodon.client.entities.api.Account restoreAccountFromString(String serializedAccount) { Gson gson = new Gson(); try { - return gson.fromJson(serializedAccount, app.fedilab.android.client.entities.api.Account.class); + return gson.fromJson(serializedAccount, app.fedilab.android.mastodon.client.entities.api.Account.class); } catch (Exception e) { return null; } diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/BaseAccount.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BaseAccount.java similarity index 92% rename from app/src/main/java/app/fedilab/android/client/entities/app/BaseAccount.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BaseAccount.java index 6174bb0c..0f30a2c2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/BaseAccount.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BaseAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -50,7 +50,7 @@ public class BaseAccount implements Serializable { @SerializedName("updated_at") public Date updated_at; @SerializedName("mastodon_account") - public app.fedilab.android.client.entities.api.Account mastodon_account; + public app.fedilab.android.mastodon.client.entities.api.Account mastodon_account; @SerializedName("admin") public boolean admin; diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BottomMenu.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BottomMenu.java index 97f25204..fe7b755e 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/BottomMenu.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BottomMenu.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,7 +33,7 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.exception.DBException; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/BubbleTimeline.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BubbleTimeline.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/BubbleTimeline.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BubbleTimeline.java index b871af44..21ba0572 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/BubbleTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/BubbleTimeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/CacheAccount.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/CacheAccount.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/CacheAccount.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/CacheAccount.java index b537d2d1..a741d2d2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/CacheAccount.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/CacheAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/InstanceSocial.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/InstanceSocial.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/app/InstanceSocial.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/InstanceSocial.java index 45083100..3dae60fc 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/InstanceSocial.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/InstanceSocial.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/Languages.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Languages.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/app/Languages.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Languages.java index 7855d851..e6c81ba6 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/Languages.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Languages.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/MutedAccounts.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/MutedAccounts.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/app/MutedAccounts.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/MutedAccounts.java index 520804e2..29985263 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/MutedAccounts.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/MutedAccounts.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -27,8 +27,8 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.exception.DBException; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Pinned.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Pinned.java index eb6e87ec..514bf389 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/Pinned.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Pinned.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,8 +29,8 @@ import java.util.Date; import java.util.List; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.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/mastodon/client/entities/app/PinnedTimeline.java similarity index 92% rename from app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/PinnedTimeline.java index 1158f816..387704e7 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/PinnedTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/PinnedTimeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -18,7 +18,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -import app.fedilab.android.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; public class PinnedTimeline implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/PostState.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/PostState.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/PostState.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/PostState.java index 1aff37b8..d826de23 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/PostState.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/PostState.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/Quotes.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Quotes.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/Quotes.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Quotes.java index 95c82ff1..41569639 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/Quotes.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Quotes.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/ReleaseNote.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ReleaseNote.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/ReleaseNote.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ReleaseNote.java index 224d54fe..1b881ab2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/ReleaseNote.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ReleaseNote.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/RemoteInstance.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/RemoteInstance.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/app/RemoteInstance.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/RemoteInstance.java index 6230dd1b..acec24b0 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/RemoteInstance.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/RemoteInstance.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/ScheduledBoost.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ScheduledBoost.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/app/ScheduledBoost.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ScheduledBoost.java index bc48883a..34aaaa25 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/ScheduledBoost.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/ScheduledBoost.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,8 +14,8 @@ package app.fedilab.android.client.entities.app; * 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.app.StatusCache.mastodonStatusToStringStorage; -import static app.fedilab.android.client.entities.app.StatusCache.restoreStatusFromString; +import static app.fedilab.android.mastodon.client.entities.app.StatusCache.mastodonStatusToStringStorage; +import static app.fedilab.android.mastodon.client.entities.app.StatusCache.restoreStatusFromString; import android.content.ContentValues; import android.content.Context; @@ -32,9 +32,9 @@ import java.util.List; import java.util.UUID; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import app.fedilab.android.sqlite.Sqlite; public class ScheduledBoost implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusCache.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusCache.java index d60a72ed..5c7f3be2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/StatusCache.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusCache.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,12 +28,12 @@ import java.util.Date; import java.util.List; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.api.Conversation; -import app.fedilab.android.client.entities.api.Notification; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.entities.api.Conversation; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; import app.fedilab.android.sqlite.Sqlite; public class StatusCache { diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusDraft.java similarity index 98% rename from app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusDraft.java index 83e76075..fa6c3be2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/StatusDraft.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/StatusDraft.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -30,9 +30,9 @@ import java.util.List; import java.util.UUID; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import app.fedilab.android.sqlite.Sqlite; diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/TagTimeline.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/TagTimeline.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/app/TagTimeline.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/TagTimeline.java index 9a96ac61..73db9b97 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/TagTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/TagTimeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/app/Timeline.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Timeline.java similarity index 99% rename from app/src/main/java/app/fedilab/android/client/entities/app/Timeline.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Timeline.java index c4196055..a475d237 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/Timeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/Timeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.client.entities.app; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -25,7 +25,7 @@ import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.exception.DBException; import app.fedilab.android.sqlite.Sqlite; public class Timeline { diff --git a/app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/WellKnownNodeinfo.java similarity index 97% rename from app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/app/WellKnownNodeinfo.java index 7c376cf6..c035bcef 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/app/WellKnownNodeinfo.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/app/WellKnownNodeinfo.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.app; +package app.fedilab.android.mastodon.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/misskey/MisskeyNote.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/misskey/MisskeyNote.java similarity index 95% rename from app/src/main/java/app/fedilab/android/client/entities/misskey/MisskeyNote.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/misskey/MisskeyNote.java index 0c5ccaf1..fa80dd9a 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/misskey/MisskeyNote.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/misskey/MisskeyNote.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.misskey; +package app.fedilab.android.mastodon.client.entities.misskey; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; @SuppressWarnings("ALL") diff --git a/app/src/main/java/app/fedilab/android/client/entities/nitter/Nitter.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/nitter/Nitter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/client/entities/nitter/Nitter.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/nitter/Nitter.java index 18add3ac..b9455c64 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/nitter/Nitter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/nitter/Nitter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.nitter; +package app.fedilab.android.mastodon.client.entities.nitter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -32,10 +32,11 @@ import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; -import app.fedilab.android.client.endpoints.MastodonTimelinesService; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonTimelinesService; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; @@ -105,7 +106,7 @@ public class Nitter implements Serializable { } } Nitter nitterAccount = accounts.get(feedItem.creator); - app.fedilab.android.client.entities.api.Account account = new app.fedilab.android.client.entities.api.Account(); + Account account = new Account(); if (nitterAccount != null) { String[] names = nitterAccount.image.title.split("/"); account.id = feedItem.guid; diff --git a/app/src/main/java/app/fedilab/android/client/entities/peertube/PeertubeVideo.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/peertube/PeertubeVideo.java similarity index 96% rename from app/src/main/java/app/fedilab/android/client/entities/peertube/PeertubeVideo.java rename to app/src/main/java/app/fedilab/android/mastodon/client/entities/peertube/PeertubeVideo.java index 8952b4d9..f769292d 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/peertube/PeertubeVideo.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/peertube/PeertubeVideo.java @@ -1,4 +1,4 @@ -package app.fedilab.android.client.entities.peertube; +package app.fedilab.android.mastodon.client.entities.peertube; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; @SuppressWarnings("ALL") public class PeertubeVideo implements Serializable { diff --git a/app/src/main/java/app/fedilab/android/exception/DBException.java b/app/src/main/java/app/fedilab/android/mastodon/exception/DBException.java similarity index 77% rename from app/src/main/java/app/fedilab/android/exception/DBException.java rename to app/src/main/java/app/fedilab/android/mastodon/exception/DBException.java index c49c0899..7c40ebee 100644 --- a/app/src/main/java/app/fedilab/android/exception/DBException.java +++ b/app/src/main/java/app/fedilab/android/mastodon/exception/DBException.java @@ -1,4 +1,4 @@ -package app.fedilab.android.exception; +package app.fedilab.android.mastodon.exception; public class DBException extends Exception { diff --git a/app/src/main/java/app/fedilab/android/helper/CacheDataSourceFactory.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CacheDataSourceFactory.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/CacheDataSourceFactory.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CacheDataSourceFactory.java index 5723f860..3f74b906 100644 --- a/app/src/main/java/app/fedilab/android/helper/CacheDataSourceFactory.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CacheDataSourceFactory.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/CacheHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CacheHelper.java similarity index 93% rename from app/src/main/java/app/fedilab/android/helper/CacheHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CacheHelper.java index 46ecb5c9..b71631cb 100644 --- a/app/src/main/java/app/fedilab/android/helper/CacheHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CacheHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,12 +28,12 @@ import java.util.Map; import java.util.Objects; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.CacheAccount; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.CacheAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; public class CacheHelper { diff --git a/app/src/main/java/app/fedilab/android/helper/CirclesDrawingView.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CirclesDrawingView.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/CirclesDrawingView.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CirclesDrawingView.java index 34aa1acc..995e6556 100644 --- a/app/src/main/java/app/fedilab/android/helper/CirclesDrawingView.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CirclesDrawingView.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import android.content.Context; import android.graphics.Canvas; diff --git a/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CommentDecorationHelper.java similarity index 96% rename from app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CommentDecorationHelper.java index 8a6c0b04..3e3f946c 100644 --- a/app/src/main/java/app/fedilab/android/helper/CommentDecorationHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CommentDecorationHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull; import java.util.List; -import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Status; public class CommentDecorationHelper { diff --git a/app/src/main/java/app/fedilab/android/helper/CountDrawable.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CountDrawable.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/CountDrawable.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CountDrawable.java index fe2c699d..e0cec4ef 100644 --- a/app/src/main/java/app/fedilab/android/helper/CountDrawable.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CountDrawable.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CrossActionHelper.java similarity index 93% rename from app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CrossActionHelper.java index 91e341eb..688ccdf3 100644 --- a/app/src/main/java/app/fedilab/android/helper/CrossActionHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CrossActionHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -37,18 +37,18 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.BaseActivity; -import app.fedilab.android.activities.ComposeActivity; -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.client.entities.app.BaseAccount; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.ui.drawer.AccountsSearchAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.activities.BaseActivity; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.client.endpoints.MastodonSearchService; +import app.fedilab.android.mastodon.client.entities.api.Results; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.ui.drawer.AccountsSearchAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; import es.dmoral.toasty.Toasty; import okhttp3.OkHttpClient; import retrofit2.Call; @@ -67,7 +67,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.entities.api.Account targetedAccount, Status targetedStatus) { + public static void doCrossAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, app.fedilab.android.mastodon.client.entities.api.Account targetedAccount, Status targetedStatus) { final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); new Thread(() -> { try { @@ -77,7 +77,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 (BaseAccount account : accounts) { account.mastodon_account.acct += "@" + account.instance; accountList.add(account.mastodon_account); @@ -132,7 +132,7 @@ public class CrossActionHelper { /** * Fetch and federate the remote account or status */ - private static void fetchRemote(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull BaseAccount ownerAccount, app.fedilab.android.client.entities.api.Account targetedAccount, Status targetedStatus) { + private static void fetchRemote(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull BaseAccount ownerAccount, app.fedilab.android.mastodon.client.entities.api.Account targetedAccount, Status targetedStatus) { SearchVM searchVM = new ViewModelProvider((ViewModelStoreOwner) context).get("crossactions", SearchVM.class); if (targetedAccount != null) { @@ -145,7 +145,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.entities.api.Account account = results.accounts.get(0); + app.fedilab.android.mastodon.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(); @@ -170,7 +170,7 @@ public class CrossActionHelper { /** * Do action when status or account has been fetched */ - private static void applyAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull BaseAccount ownerAccount, app.fedilab.android.client.entities.api.Account targetedAccount, Status targetedStatus) { + private static void applyAction(@NonNull Context context, @NonNull TypeOfCrossAction actionType, @NonNull BaseAccount ownerAccount, app.fedilab.android.mastodon.client.entities.api.Account targetedAccount, Status targetedStatus) { AccountsVM accountsVM = null; StatusesVM statusesVM = null; @@ -402,7 +402,7 @@ public class CrossActionHelper { List accounts; try { accounts = new Account(context).getAll(); - List accountList = new ArrayList<>(); + List accountList = new ArrayList<>(); for (BaseAccount account : accounts) { account.mastodon_account.acct += "@" + account.instance; accountList.add(account.mastodon_account); @@ -537,6 +537,6 @@ public class CrossActionHelper { public interface Callback { void federatedStatus(Status status); - void federatedAccount(app.fedilab.android.client.entities.api.Account account); + void federatedAccount(app.fedilab.android.mastodon.client.entities.api.Account account); } } diff --git a/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/CustomEmoji.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java index f7689766..b1bd8244 100644 --- a/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import android.content.Context; import android.content.SharedPreferences; @@ -25,8 +25,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Emoji; -import app.fedilab.android.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.Status; public class CustomEmoji extends ReplacementSpan { diff --git a/app/src/main/java/app/fedilab/android/helper/CustomQuoteSpan.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomQuoteSpan.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/CustomQuoteSpan.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CustomQuoteSpan.java index fdc55b5a..07cb9436 100644 --- a/app/src/main/java/app/fedilab/android/helper/CustomQuoteSpan.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomQuoteSpan.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import android.graphics.Canvas; import android.graphics.Paint; diff --git a/app/src/main/java/app/fedilab/android/helper/CustomTextView.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomTextView.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/CustomTextView.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/CustomTextView.java index 3ff4f050..bd05a38a 100644 --- a/app/src/main/java/app/fedilab/android/helper/CustomTextView.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomTextView.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * diff --git a/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java b/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/DividerDecoration.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java index 8b70c59d..a4b444fa 100644 --- a/app/src/main/java/app/fedilab/android/helper/DividerDecoration.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -31,8 +31,8 @@ import java.util.Arrays; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.ui.drawer.StatusAdapter; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.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/mastodon/helper/DividerDecorationSimple.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecorationSimple.java index df664b1f..aacacc2d 100644 --- a/app/src/main/java/app/fedilab/android/helper/DividerDecorationSimple.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecorationSimple.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -31,8 +31,8 @@ import java.util.Arrays; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.ui.drawer.ComposeAdapter; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.ui.drawer.ComposeAdapter; public class DividerDecorationSimple extends RecyclerView.ItemDecoration { diff --git a/app/src/main/java/app/fedilab/android/helper/ECDH.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDH.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/ECDH.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/ECDH.java index e3d79e7d..2bfa690d 100644 --- a/app/src/main/java/app/fedilab/android/helper/ECDH.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDH.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/ECDHFedilab.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/ECDHFedilab.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java index de56a192..b31b931e 100644 --- a/app/src/main/java/app/fedilab/android/helper/ECDHFedilab.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,7 +14,7 @@ package app.fedilab.android.helper; * 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.app.StatusCache.restoreNotificationFromString; +import static app.fedilab.android.mastodon.client.entities.app.StatusCache.restoreNotificationFromString; import android.content.Context; import android.content.SharedPreferences; @@ -52,7 +52,7 @@ import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; -import app.fedilab.android.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Notification; public class ECDHFedilab { diff --git a/app/src/main/java/app/fedilab/android/helper/FedilabAutoCompleteTextView.java b/app/src/main/java/app/fedilab/android/mastodon/helper/FedilabAutoCompleteTextView.java similarity index 95% rename from app/src/main/java/app/fedilab/android/helper/FedilabAutoCompleteTextView.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/FedilabAutoCompleteTextView.java index a5b2e47f..179e6a3d 100644 --- a/app/src/main/java/app/fedilab/android/helper/FedilabAutoCompleteTextView.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/FedilabAutoCompleteTextView.java @@ -1,6 +1,4 @@ -package app.fedilab.android.helper; - -import static app.fedilab.android.ui.drawer.ComposeAdapter.autocomplete; +package app.fedilab.android.mastodon.helper; import android.content.Context; import android.content.SharedPreferences; @@ -27,7 +25,8 @@ import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.emoji.Emoji; import app.fedilab.android.R; -import app.fedilab.android.interfaces.EmojiEditTextInterface; +import app.fedilab.android.mastodon.interfaces.EmojiEditTextInterface; +import app.fedilab.android.mastodon.ui.drawer.ComposeAdapter; public class FedilabAutoCompleteTextView extends MaterialAutoCompleteTextView implements EmojiEditTextInterface { @@ -136,7 +135,7 @@ public class FedilabAutoCompleteTextView extends MaterialAutoCompleteTextView im protected void onTextChanged(final CharSequence text, final int start, final int lengthBefore, final int lengthAfter) { final Paint.FontMetrics fontMetrics = getPaint().getFontMetrics(); final float defaultEmojiSize = fontMetrics.descent - fontMetrics.ascent; - if (emoji && !autocomplete) { + if (emoji && !ComposeAdapter.autocomplete) { EmojiManager.getInstance().replaceWithImages(getContext(), getText(), emojiSize, defaultEmojiSize); } } @@ -160,7 +159,7 @@ public class FedilabAutoCompleteTextView extends MaterialAutoCompleteTextView im @Override @CallSuper public void input(final Emoji emoji) { - if (emoji != null && !autocomplete) { + if (emoji != null && !ComposeAdapter.autocomplete) { final int start = getSelectionStart(); final int end = getSelectionEnd(); @@ -176,7 +175,7 @@ public class FedilabAutoCompleteTextView extends MaterialAutoCompleteTextView im public final void setEmojiSize(@Px final int pixels, final boolean shouldInvalidate) { emojiSize = pixels; - if (shouldInvalidate && !autocomplete) { + if (shouldInvalidate && !ComposeAdapter.autocomplete) { setText(getText()); } } diff --git a/app/src/main/java/app/fedilab/android/helper/FileNameCleaner.java b/app/src/main/java/app/fedilab/android/mastodon/helper/FileNameCleaner.java similarity index 95% rename from app/src/main/java/app/fedilab/android/helper/FileNameCleaner.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/FileNameCleaner.java index cae4a129..0da4ee46 100644 --- a/app/src/main/java/app/fedilab/android/helper/FileNameCleaner.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/FileNameCleaner.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import java.util.Arrays; diff --git a/app/src/main/java/app/fedilab/android/helper/GlideFocus.java b/app/src/main/java/app/fedilab/android/mastodon/helper/GlideFocus.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/GlideFocus.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/GlideFocus.java index 688cc897..501a61d9 100644 --- a/app/src/main/java/app/fedilab/android/helper/GlideFocus.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/GlideFocus.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/Helper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java index f8bd2dc0..5dda503c 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,8 +16,8 @@ package app.fedilab.android.helper; import static android.content.Context.DOWNLOAD_SERVICE; import static app.fedilab.android.BaseMainActivity.currentAccount; -import static app.fedilab.android.activities.BaseActivity.currentThemeId; -import static app.fedilab.android.helper.LogoHelper.getNotificationIcon; +import static app.fedilab.android.mastodon.activities.BaseActivity.currentThemeId; +import static app.fedilab.android.mastodon.helper.LogoHelper.getNotificationIcon; import android.annotation.SuppressLint; import android.app.Activity; @@ -145,25 +145,25 @@ import app.fedilab.android.BaseMainActivity; import app.fedilab.android.BuildConfig; import app.fedilab.android.MainApplication; import app.fedilab.android.R; -import app.fedilab.android.activities.ComposeActivity; import app.fedilab.android.activities.LoginActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.broadcastreceiver.ToastMessage; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.ReleaseNote; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.PopupReleaseNotesBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.interfaces.OnDownloadInterface; -import app.fedilab.android.ui.drawer.ReleaseNoteAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.OauthVM; -import app.fedilab.android.watermark.androidwm.WatermarkBuilder; -import app.fedilab.android.watermark.androidwm.bean.WatermarkText; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.broadcastreceiver.ToastMessage; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.ReleaseNote; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.interfaces.OnDownloadInterface; +import app.fedilab.android.mastodon.ui.drawer.ReleaseNoteAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.OauthVM; +import app.fedilab.android.mastodon.watermark.androidwm.WatermarkBuilder; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkText; import es.dmoral.toasty.Toasty; import okhttp3.MediaType; import okhttp3.MultipartBody; @@ -1837,7 +1837,7 @@ public class Helper { } @Override - public void federatedAccount(app.fedilab.android.client.entities.api.Account account) { + public void federatedAccount(app.fedilab.android.mastodon.client.entities.api.Account account) { if (account != null && account.username.equalsIgnoreCase("apps")) { MastodonHelper.loadPPMastodon(binding.accountPp, account); @@ -1972,7 +1972,7 @@ public class Helper { return R.style.AppTheme; } - public static void addMutedAccount(app.fedilab.android.client.entities.api.Account target) { + public static void addMutedAccount(app.fedilab.android.mastodon.client.entities.api.Account target) { if (MainActivity.filteredAccounts == null) { MainActivity.filteredAccounts = new ArrayList<>(); } @@ -1981,7 +1981,7 @@ public class Helper { } } - public static void removeMutedAccount(app.fedilab.android.client.entities.api.Account target) { + public static void removeMutedAccount(app.fedilab.android.mastodon.client.entities.api.Account target) { if (MainActivity.filteredAccounts != null) { MainActivity.filteredAccounts.remove(target); } diff --git a/app/src/main/java/app/fedilab/android/helper/LogoHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/LogoHelper.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/LogoHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/LogoHelper.java index 1a009e78..75310814 100644 --- a/app/src/main/java/app/fedilab/android/helper/LogoHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/LogoHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/LongClickLinkMovementMethod.java b/app/src/main/java/app/fedilab/android/mastodon/helper/LongClickLinkMovementMethod.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/LongClickLinkMovementMethod.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/LongClickLinkMovementMethod.java index 708384d1..c3b57a8e 100644 --- a/app/src/main/java/app/fedilab/android/helper/LongClickLinkMovementMethod.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/LongClickLinkMovementMethod.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import android.os.Handler; import android.text.Layout; diff --git a/app/src/main/java/app/fedilab/android/helper/LongClickableSpan.java b/app/src/main/java/app/fedilab/android/mastodon/helper/LongClickableSpan.java similarity index 80% rename from app/src/main/java/app/fedilab/android/helper/LongClickableSpan.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/LongClickableSpan.java index 9d518ec9..0472245a 100644 --- a/app/src/main/java/app/fedilab/android/helper/LongClickableSpan.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/LongClickableSpan.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import android.text.style.ClickableSpan; import android.view.View; diff --git a/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/MastodonHelper.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/MastodonHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/MastodonHelper.java index 4dce9e61..a5a31444 100644 --- a/app/src/main/java/app/fedilab/android/helper/MastodonHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/MastodonHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -59,16 +59,16 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -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; -import app.fedilab.android.ui.drawer.ComposeAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.ScheduledBoost; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.jobs.ScheduleBoostWorker; +import app.fedilab.android.mastodon.ui.drawer.ComposeAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; import es.dmoral.toasty.Toasty; import okhttp3.Headers; diff --git a/app/src/main/java/app/fedilab/android/helper/MediaHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/MediaHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java index 675d86f6..2b0d853d 100644 --- a/app/src/main/java/app/fedilab/android/helper/MediaHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -16,8 +16,7 @@ package app.fedilab.android.helper; import static android.content.Context.DOWNLOAD_SERVICE; import static app.fedilab.android.BaseMainActivity.currentAccount; -import static app.fedilab.android.helper.Helper.notify_user; -import static app.fedilab.android.helper.LogoHelper.getMainLogo; +import static app.fedilab.android.mastodon.helper.LogoHelper.getMainLogo; import android.app.Activity; import android.app.DownloadManager; @@ -73,11 +72,11 @@ import java.util.concurrent.atomic.AtomicInteger; import app.fedilab.android.BuildConfig; import app.fedilab.android.R; -import app.fedilab.android.activities.ComposeActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.api.Attachment; import app.fedilab.android.databinding.DatetimePickerBinding; import app.fedilab.android.databinding.PopupRecordBinding; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; import es.dmoral.toasty.Toasty; public class MediaHelper { @@ -173,7 +172,7 @@ public class MediaHelper { intent.setDataAndType(uri, mime); MediaScannerConnection.scanFile(context, new String[]{backupFile.getAbsolutePath()}, null, null); if (!share) { - notify_user(context, currentAccount, intent, BitmapFactory.decodeResource(context.getResources(), + Helper.notify_user(context, currentAccount, intent, BitmapFactory.decodeResource(context.getResources(), getMainLogo(context)), Helper.NotifType.STORE, context.getString(R.string.save_over), context.getString(R.string.download_from, fileName)); Toasty.success(context, context.getString(R.string.save_over), Toasty.LENGTH_LONG).show(); } else { diff --git a/app/src/main/java/app/fedilab/android/helper/MyAppGlideModule.java b/app/src/main/java/app/fedilab/android/mastodon/helper/MyAppGlideModule.java similarity index 85% rename from app/src/main/java/app/fedilab/android/helper/MyAppGlideModule.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/MyAppGlideModule.java index 5b7b2b5f..53aa3138 100644 --- a/app/src/main/java/app/fedilab/android/helper/MyAppGlideModule.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/MyAppGlideModule.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; import com.bumptech.glide.annotation.GlideModule; import com.bumptech.glide.module.AppGlideModule; diff --git a/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java similarity index 96% rename from app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java index 2df96d39..06dd6b14 100644 --- a/app/src/main/java/app/fedilab/android/helper/NotificationsHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,9 +15,7 @@ package app.fedilab.android.helper; * see . */ import static android.text.Html.FROM_HTML_MODE_LEGACY; -import static app.fedilab.android.helper.Helper.notify_user; -import static app.fedilab.android.helper.LogoHelper.getMainLogo; -import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; +import static app.fedilab.android.mastodon.helper.LogoHelper.getMainLogo; import android.content.Context; import android.content.Intent; @@ -51,12 +49,13 @@ 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.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.client.entities.app.BaseAccount; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Notifications; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; @@ -380,7 +379,7 @@ public class NotificationsHelper { Helper.NotifType finalNotifType = notifType; String finalMessage = message; String finalTitle = title; - sendAction(context, Helper.ARG_REFRESH_NOTFICATION, null, null); + StatusAdapter.sendAction(context, Helper.ARG_REFRESH_NOTFICATION, null, null); Runnable myRunnable = () -> Glide.with(context) .asBitmap() .load(finalNotificationUrl != null ? finalNotificationUrl : R.drawable.fedilab_logo_bubbles) @@ -399,7 +398,7 @@ public class NotificationsHelper { since_ids.put(account.user_id + "@" + account.instance, lastNotif); editor.putString(context.getString(R.string.LAST_NOTIFICATION_ID) + account.user_id + "@" + account.instance, notifications.get(0).id); editor.apply(); - notify_user(context, account, intent, BitmapFactory.decodeResource(context.getResources(), + Helper.notify_user(context, account, intent, BitmapFactory.decodeResource(context.getResources(), getMainLogo(context)), finalNotifType, finalTitle, finalMessage); } return false; @@ -414,7 +413,7 @@ public class NotificationsHelper { editor.putString(context.getString(R.string.LAST_NOTIFICATION_ID) + account.user_id + "@" + account.instance, notifications.get(0).id); editor.apply(); since_ids.put(account.user_id + "@" + account.instance, lastNotif); - notify_user(context, account, intent, resource, finalNotifType, finalTitle, finalMessage); + Helper.notify_user(context, account, intent, resource, finalNotifType, finalTitle, finalMessage); } } diff --git a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java index ae88c051..b8a33c38 100644 --- a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -21,7 +21,6 @@ import static app.fedilab.android.BaseMainActivity.currentUserID; import static app.fedilab.android.BaseMainActivity.show_boosts; import static app.fedilab.android.BaseMainActivity.show_dms; import static app.fedilab.android.BaseMainActivity.show_replies; -import static app.fedilab.android.ui.pageadapter.FedilabPageAdapter.BOTTOM_TIMELINE_COUNT; import android.annotation.SuppressLint; import android.content.SharedPreferences; @@ -60,25 +59,25 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.api.MastodonList; -import app.fedilab.android.client.entities.app.BottomMenu; -import app.fedilab.android.client.entities.app.BubbleTimeline; -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.StatusCache; -import app.fedilab.android.client.entities.app.TagTimeline; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.ActivityMainBinding; import app.fedilab.android.databinding.DialogBubbleExcludeVisibilityBinding; import app.fedilab.android.databinding.DialogBubbleReplyVisibilityBinding; import app.fedilab.android.databinding.TabCustomDefaultViewBinding; import app.fedilab.android.databinding.TabCustomViewBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer; -import app.fedilab.android.ui.pageadapter.FedilabPageAdapter; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.client.entities.app.BubbleTimeline; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.RemoteInstance; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.TagTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonConversation; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentNotificationContainer; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabPageAdapter; import es.dmoral.toasty.Toasty; public class PinnedTimelineHelper { @@ -153,7 +152,7 @@ public class PinnedTimelineHelper { if (createDefaultAtTop) { //We shift all position for (PinnedTimeline pinnedTimeline : pinned.pinnedTimelines) { - pinnedTimeline.position += BOTTOM_TIMELINE_COUNT; + pinnedTimeline.position += FedilabPageAdapter.BOTTOM_TIMELINE_COUNT; } PinnedTimeline pinnedTimelineHome = new PinnedTimeline(); pinnedTimelineHome.type = Timeline.TimeLineEnum.HOME; @@ -300,11 +299,11 @@ public class PinnedTimelineHelper { } //Pinned tab position will start after BOTTOM_TIMELINE_COUNT (ie 5) activityMainBinding.tabLayout.removeAllTabs(); - int toRemove = BOTTOM_TIMELINE_COUNT; + int toRemove = FedilabPageAdapter.BOTTOM_TIMELINE_COUNT; if (!singleBar) { //Small hack to hide first tabs (they represent the item of the bottom menu) toRemove = itemToRemoveInBottomMenu(activity); - for (int i = 0; i < (BOTTOM_TIMELINE_COUNT - toRemove); i++) { + for (int i = 0; i < (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); i++) { activityMainBinding.tabLayout.addTab(activityMainBinding.tabLayout.newTab()); ((ViewGroup) activityMainBinding.tabLayout.getChildAt(0)).getChildAt(i).setVisibility(View.GONE); } @@ -480,7 +479,7 @@ public class PinnedTimelineHelper { if (singleBar) { finalI = i; } else { - finalI = BOTTOM_TIMELINE_COUNT - finalToRemove1 + j; + finalI = FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - finalToRemove1 + j; } item.setOnMenuItemClickListener(item1 -> { if (finalI < activityMainBinding.tabLayout.getTabCount() && activityMainBinding.tabLayout.getTabAt(finalI) != null) { @@ -506,7 +505,7 @@ public class PinnedTimelineHelper { int finalI = i; tabStrip.getChildAt(i).setOnLongClickListener(v -> { - int position = finalI - (BOTTOM_TIMELINE_COUNT - finalToRemove); + int position = finalI - (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - finalToRemove); switch (pinnedTimelineVisibleList.get(position).type) { case LIST: @@ -549,7 +548,7 @@ public class PinnedTimelineHelper { @Override public void onPageSelected(int position) { - if (position < BOTTOM_TIMELINE_COUNT - finalToRemove) { + if (position < FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - finalToRemove) { activityMainBinding.bottomNavView.getMenu().getItem(position).setChecked(true); } else { activityMainBinding.bottomNavView.getMenu().setGroupCheckable(0, true, false); @@ -788,7 +787,7 @@ public class PinnedTimelineHelper { public static void tagClick(BaseMainActivity activity, Pinned pinned, View view, ActivityMainBinding activityMainBinding, int position, String slug) { int toRemove = itemToRemoveInBottomMenu(activity); PopupMenu popup = new PopupMenu(activity, view); - int offSetPosition = position - (BOTTOM_TIMELINE_COUNT - toRemove); + int offSetPosition = position - (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); boolean singleBar = sharedpreferences.getBoolean(activity.getString(R.string.SET_USE_SINGLE_TOPBAR), false); if (singleBar) { @@ -1019,7 +1018,7 @@ public class PinnedTimelineHelper { public static void bubbleClick(BaseMainActivity activity, Pinned pinned, View view, ActivityMainBinding activityMainBinding, int position, String slug) { int toRemove = itemToRemoveInBottomMenu(activity); PopupMenu popup = new PopupMenu(activity, view); - int offSetPosition = position - (BOTTOM_TIMELINE_COUNT - toRemove); + int offSetPosition = position - (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); boolean singleBar = sharedpreferences.getBoolean(activity.getString(R.string.SET_USE_SINGLE_TOPBAR), false); if (singleBar) { @@ -1258,7 +1257,7 @@ public class PinnedTimelineHelper { PopupMenu popup = new PopupMenu(activity, view); int toRemove = itemToRemoveInBottomMenu(activity); - int offSetPosition = position - (BOTTOM_TIMELINE_COUNT - toRemove); + int offSetPosition = position - (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); boolean singleBar = sharedpreferences.getBoolean(activity.getString(R.string.SET_USE_SINGLE_TOPBAR), false); if (singleBar) { @@ -1478,7 +1477,7 @@ public class PinnedTimelineHelper { public static void nitterClick(BaseMainActivity activity, Pinned pinned, View view, ActivityMainBinding activityMainBinding, int position, String slug) { int toRemove = itemToRemoveInBottomMenu(activity); - int offSetPosition = position - (BOTTOM_TIMELINE_COUNT - toRemove); + int offSetPosition = position - (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); boolean singleBar = sharedpreferences.getBoolean(activity.getString(R.string.SET_USE_SINGLE_TOPBAR), false); if (singleBar) { diff --git a/app/src/main/java/app/fedilab/android/helper/PushHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/PushHelper.java similarity index 96% rename from app/src/main/java/app/fedilab/android/helper/PushHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/PushHelper.java index 68ef4b3a..d428fc1e 100644 --- a/app/src/main/java/app/fedilab/android/helper/PushHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/PushHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -40,9 +40,9 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.jobs.NotificationsWorker; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.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/mastodon/helper/PushNotifications.java similarity index 93% rename from app/src/main/java/app/fedilab/android/helper/PushNotifications.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/PushNotifications.java index eda24259..1861d956 100644 --- a/app/src/main/java/app/fedilab/android/helper/PushNotifications.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/PushNotifications.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -26,11 +26,11 @@ import androidx.preference.PreferenceManager; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -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.client.entities.app.BaseAccount; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.mastodon.client.entities.api.PushSubscription; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.exception.DBException; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/SpannableHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java index f83d53c5..b4699d09 100644 --- a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -16,7 +16,6 @@ package app.fedilab.android.helper; import static app.fedilab.android.BaseMainActivity.currentAccount; -import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; import android.app.Activity; import android.content.ClipData; @@ -73,19 +72,20 @@ import javax.net.ssl.HttpsURLConnection; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.entities.api.Account; -import app.fedilab.android.client.entities.api.Announcement; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Emoji; -import app.fedilab.android.client.entities.api.Filter; -import app.fedilab.android.client.entities.api.Mention; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.PopupLinksBinding; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.activities.HashTagActivity; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Announcement; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.Mention; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; import es.dmoral.toasty.Toasty; public class SpannableHelper { @@ -657,7 +657,7 @@ public class SpannableHelper { if (status != null) { status.filteredByApp = filter; } - sendAction(context, Helper.ARG_TIMELINE_REFRESH_ALL, null, null); + StatusAdapter.sendAction(context, Helper.ARG_TIMELINE_REFRESH_ALL, null, null); dialog.dismiss(); }) .setNegativeButton(R.string.no, (dialog, which) -> dialog.dismiss()) diff --git a/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/ThemeHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java index 46223b1a..d2f690da 100644 --- a/app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/TimelineHelper.java similarity index 96% rename from app/src/main/java/app/fedilab/android/helper/TimelineHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/TimelineHelper.java index 42bfc8f4..ffdc6bdc 100644 --- a/app/src/main/java/app/fedilab/android/helper/TimelineHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/TimelineHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -39,13 +39,13 @@ import java.util.regex.Pattern; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.endpoints.MastodonFiltersService; -import app.fedilab.android.client.entities.api.Account; -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.client.entities.app.Timeline; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.client.endpoints.MastodonFiltersService; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/helper/TranslateHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/TranslateHelper.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/TranslateHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/TranslateHelper.java index 41266be9..12336b6a 100644 --- a/app/src/main/java/app/fedilab/android/helper/TranslateHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/TranslateHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,7 +33,7 @@ import java.util.List; import java.util.Set; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Languages; +import app.fedilab.android.mastodon.client.entities.app.Languages; import es.dmoral.toasty.Toasty; public class TranslateHelper { diff --git a/app/src/main/java/app/fedilab/android/helper/ZipHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java similarity index 99% rename from app/src/main/java/app/fedilab/android/helper/ZipHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java index ffe595d8..fa7beb78 100644 --- a/app/src/main/java/app/fedilab/android/helper/ZipHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper; +package app.fedilab.android.mastodon.helper; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -16,7 +16,7 @@ package app.fedilab.android.helper; import static app.fedilab.android.BaseMainActivity.currentAccount; -import static app.fedilab.android.helper.LogoHelper.getMainLogo; +import static app.fedilab.android.mastodon.helper.LogoHelper.getMainLogo; import static app.fedilab.android.sqlite.Sqlite.DB_NAME; import static app.fedilab.android.sqlite.Sqlite.db; diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharing.java similarity index 95% rename from app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharing.java index e9ccdd72..23743368 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharing.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharing.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.customsharing; +package app.fedilab.android.mastodon.helper.customsharing; /* Copyright 2019 Curtis Rock * * This file is a part of Fedilab @@ -23,8 +23,8 @@ import java.io.IOException; import java.util.Objects; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.entities.api.Error; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.api.Error; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingAsyncTask.java b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingAsyncTask.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingAsyncTask.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingAsyncTask.java index dffc5de8..e763dae3 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingAsyncTask.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingAsyncTask.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.customsharing; +package app.fedilab.android.mastodon.helper.customsharing; /* Copyright 2017 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingResponse.java similarity index 90% rename from app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingResponse.java index 589acef6..0f15cd4e 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/CustomSharingResponse.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/CustomSharingResponse.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.customsharing; +package app.fedilab.android.mastodon.helper.customsharing; /* Copyright 2019 Curtis Rock * * This file is a part of Fedilab @@ -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.entities.api.Error; +import app.fedilab.android.mastodon.client.entities.api.Error; /** * Created by Curtis on 13/02/2019. diff --git a/app/src/main/java/app/fedilab/android/helper/customsharing/OnCustomSharingInterface.java b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/OnCustomSharingInterface.java similarity index 94% rename from app/src/main/java/app/fedilab/android/helper/customsharing/OnCustomSharingInterface.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/OnCustomSharingInterface.java index d8d358fb..1943db30 100644 --- a/app/src/main/java/app/fedilab/android/helper/customsharing/OnCustomSharingInterface.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/customsharing/OnCustomSharingInterface.java @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -package app.fedilab.android.helper.customsharing; +package app.fedilab.android.mastodon.helper.customsharing; /** diff --git a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperAdapter.java index 4c3517fc..a5e5b070 100644 --- a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.itemtouchhelper; +package app.fedilab.android.mastodon.helper.itemtouchhelper; /* * Copyright (C) 2015 Paul Burke diff --git a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperViewHolder.java b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperViewHolder.java similarity index 95% rename from app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperViewHolder.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperViewHolder.java index a37c1524..3850c7d3 100644 --- a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/ItemTouchHelperViewHolder.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/ItemTouchHelperViewHolder.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.itemtouchhelper; +package app.fedilab.android.mastodon.helper.itemtouchhelper; /* * Copyright (C) 2015 Paul Burke diff --git a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnStartDragListener.java b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnStartDragListener.java similarity index 93% rename from app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnStartDragListener.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnStartDragListener.java index 68426890..f09c9e0f 100644 --- a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnStartDragListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnStartDragListener.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.itemtouchhelper; +package app.fedilab.android.mastodon.helper.itemtouchhelper; /* * Copyright (C) 2015 Paul Burke diff --git a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnUndoListener.java b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnUndoListener.java similarity index 88% rename from app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnUndoListener.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnUndoListener.java index 6ba1a083..9654f736 100644 --- a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/OnUndoListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/OnUndoListener.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.itemtouchhelper; +package app.fedilab.android.mastodon.helper.itemtouchhelper; /* Copyright 2022 Thomas Schneider * @@ -16,7 +16,7 @@ package app.fedilab.android.helper.itemtouchhelper; * see . */ -import app.fedilab.android.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; /** * Listener for manual initiation of a undo. diff --git a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java index 3c42ab28..a43c817a 100644 --- a/app/src/main/java/app/fedilab/android/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/itemtouchhelper/SimpleItemTouchHelperCallback.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.itemtouchhelper; +package app.fedilab.android.mastodon.helper.itemtouchhelper; /* * Copyright (C) 2015 Paul Burke diff --git a/app/src/main/java/app/fedilab/android/helper/settings/LongSummaryPreferenceCategory.java b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/LongSummaryPreferenceCategory.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/settings/LongSummaryPreferenceCategory.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/settings/LongSummaryPreferenceCategory.java index 56a6b0cb..1557e9ba 100644 --- a/app/src/main/java/app/fedilab/android/helper/settings/LongSummaryPreferenceCategory.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/LongSummaryPreferenceCategory.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.settings; +package app.fedilab.android.mastodon.helper.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/settings/TimePreference.java b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreference.java similarity index 97% rename from app/src/main/java/app/fedilab/android/helper/settings/TimePreference.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreference.java index 34b1fe78..65375812 100644 --- a/app/src/main/java/app/fedilab/android/helper/settings/TimePreference.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreference.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.settings; +package app.fedilab.android.mastodon.helper.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/helper/settings/TimePreferenceDialogFragment.java b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreferenceDialogFragment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/helper/settings/TimePreferenceDialogFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreferenceDialogFragment.java index 41f0ddb6..b7538565 100644 --- a/app/src/main/java/app/fedilab/android/helper/settings/TimePreferenceDialogFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/settings/TimePreferenceDialogFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.helper.settings; +package app.fedilab.android.mastodon.helper.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/imageeditor/ColorPickerAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/ColorPickerAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/ColorPickerAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/ColorPickerAdapter.java index 9a133faf..3701187b 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/ColorPickerAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/ColorPickerAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.content.Context; import android.graphics.Color; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/EditImageActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/EditImageActivity.java index 2ea8db28..ea0bae52 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/EditImageActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/EditImageActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.Manifest; @@ -41,13 +41,13 @@ import java.io.InputStream; import app.fedilab.android.R; import app.fedilab.android.databinding.ActivityEditImageBinding; -import app.fedilab.android.helper.CirclesDrawingView; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.imageeditor.base.BaseActivity; -import app.fedilab.android.imageeditor.filters.FilterListener; -import app.fedilab.android.imageeditor.filters.FilterViewAdapter; -import app.fedilab.android.imageeditor.tools.EditingToolsAdapter; -import app.fedilab.android.imageeditor.tools.ToolType; +import app.fedilab.android.mastodon.helper.CirclesDrawingView; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.imageeditor.base.BaseActivity; +import app.fedilab.android.mastodon.imageeditor.filters.FilterListener; +import app.fedilab.android.mastodon.imageeditor.filters.FilterViewAdapter; +import app.fedilab.android.mastodon.imageeditor.tools.EditingToolsAdapter; +import app.fedilab.android.mastodon.imageeditor.tools.ToolType; import es.dmoral.toasty.Toasty; import ja.burhanrashid52.photoeditor.OnPhotoEditorListener; import ja.burhanrashid52.photoeditor.PhotoEditor; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/EmojiBSFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/EmojiBSFragment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/EmojiBSFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/EmojiBSFragment.java index 61baa135..86d1f1d5 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/EmojiBSFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/EmojiBSFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.annotation.SuppressLint; import android.app.Dialog; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/FileSaveHelper.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/FileSaveHelper.java similarity index 99% rename from app/src/main/java/app/fedilab/android/imageeditor/FileSaveHelper.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/FileSaveHelper.java index 78fd8be4..08775599 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/FileSaveHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/FileSaveHelper.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.annotation.SuppressLint; import android.content.ContentResolver; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/PhotoApp.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/PhotoApp.java similarity index 97% rename from app/src/main/java/app/fedilab/android/imageeditor/PhotoApp.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/PhotoApp.java index 23d1c058..33bee41f 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/PhotoApp.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/PhotoApp.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.app.Application; import android.content.Context; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/PropertiesBSFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/PropertiesBSFragment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/PropertiesBSFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/PropertiesBSFragment.java index aac1ed59..650073ce 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/PropertiesBSFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/PropertiesBSFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/ShapeBSFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/ShapeBSFragment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/ShapeBSFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/ShapeBSFragment.java index 12dca879..77ed33a2 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/ShapeBSFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/ShapeBSFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/StickerBSFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/StickerBSFragment.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/StickerBSFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/StickerBSFragment.java index 370f9a11..3f677bcf 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/StickerBSFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/StickerBSFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.annotation.SuppressLint; import android.app.Dialog; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/TextEditorDialogFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/TextEditorDialogFragment.java similarity index 99% rename from app/src/main/java/app/fedilab/android/imageeditor/TextEditorDialogFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/TextEditorDialogFragment.java index 936056d5..c176bfee 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/TextEditorDialogFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/TextEditorDialogFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor; +package app.fedilab.android.mastodon.imageeditor; import android.app.Dialog; import android.content.Context; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/base/BaseActivity.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseActivity.java similarity index 97% rename from app/src/main/java/app/fedilab/android/imageeditor/base/BaseActivity.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseActivity.java index 3a7d262d..5d8f03f9 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/base/BaseActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseActivity.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.base; +package app.fedilab.android.mastodon.imageeditor.base; import android.app.ProgressDialog; import android.content.pm.PackageManager; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/base/BaseFragment.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseFragment.java similarity index 93% rename from app/src/main/java/app/fedilab/android/imageeditor/base/BaseFragment.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseFragment.java index 8e798b42..88077ed7 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/base/BaseFragment.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/base/BaseFragment.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.base; +package app.fedilab.android.mastodon.imageeditor.base; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/filters/FilterListener.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterListener.java similarity index 70% rename from app/src/main/java/app/fedilab/android/imageeditor/filters/FilterListener.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterListener.java index 1d627ce9..721433e0 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/filters/FilterListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterListener.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.filters; +package app.fedilab.android.mastodon.imageeditor.filters; import ja.burhanrashid52.photoeditor.PhotoFilter; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/filters/FilterViewAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterViewAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/filters/FilterViewAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterViewAdapter.java index 077e21c0..bddf8497 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/filters/FilterViewAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/filters/FilterViewAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.filters; +package app.fedilab.android.mastodon.imageeditor.filters; import android.content.Context; import android.content.res.AssetManager; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/tools/EditingToolsAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/EditingToolsAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/imageeditor/tools/EditingToolsAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/EditingToolsAdapter.java index 845b47df..8615dfdc 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/tools/EditingToolsAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/EditingToolsAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.tools; +package app.fedilab.android.mastodon.imageeditor.tools; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/app/fedilab/android/imageeditor/tools/ToolType.java b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/ToolType.java similarity index 81% rename from app/src/main/java/app/fedilab/android/imageeditor/tools/ToolType.java rename to app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/ToolType.java index 1f5a2b5c..35f597cd 100644 --- a/app/src/main/java/app/fedilab/android/imageeditor/tools/ToolType.java +++ b/app/src/main/java/app/fedilab/android/mastodon/imageeditor/tools/ToolType.java @@ -1,4 +1,4 @@ -package app.fedilab.android.imageeditor.tools; +package app.fedilab.android.mastodon.imageeditor.tools; /** * @author Burhanuddin Rashid diff --git a/app/src/main/java/app/fedilab/android/interfaces/EmojiEditTextInterface.java b/app/src/main/java/app/fedilab/android/mastodon/interfaces/EmojiEditTextInterface.java similarity index 95% rename from app/src/main/java/app/fedilab/android/interfaces/EmojiEditTextInterface.java rename to app/src/main/java/app/fedilab/android/mastodon/interfaces/EmojiEditTextInterface.java index 620f11a0..081c38a6 100644 --- a/app/src/main/java/app/fedilab/android/interfaces/EmojiEditTextInterface.java +++ b/app/src/main/java/app/fedilab/android/mastodon/interfaces/EmojiEditTextInterface.java @@ -1,4 +1,4 @@ -package app.fedilab.android.interfaces; +package app.fedilab.android.mastodon.interfaces; import androidx.annotation.DimenRes; import androidx.annotation.Px; diff --git a/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java b/app/src/main/java/app/fedilab/android/mastodon/interfaces/InstancesSocialService.java similarity index 89% rename from app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java rename to app/src/main/java/app/fedilab/android/mastodon/interfaces/InstancesSocialService.java index aba3888a..aca3f03c 100644 --- a/app/src/main/java/app/fedilab/android/interfaces/InstancesSocialService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/interfaces/InstancesSocialService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.interfaces; +package app.fedilab.android.mastodon.interfaces; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.interfaces; * see . */ -import app.fedilab.android.client.entities.app.InstanceSocial; +import app.fedilab.android.mastodon.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/interfaces/OnDownloadInterface.java b/app/src/main/java/app/fedilab/android/mastodon/interfaces/OnDownloadInterface.java similarity index 94% rename from app/src/main/java/app/fedilab/android/interfaces/OnDownloadInterface.java rename to app/src/main/java/app/fedilab/android/mastodon/interfaces/OnDownloadInterface.java index 0e4cf717..a8582e4a 100644 --- a/app/src/main/java/app/fedilab/android/interfaces/OnDownloadInterface.java +++ b/app/src/main/java/app/fedilab/android/mastodon/interfaces/OnDownloadInterface.java @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -package app.fedilab.android.interfaces; +package app.fedilab.android.mastodon.interfaces; public interface OnDownloadInterface { void onDownloaded(String saveFilePath, String downloadUrl, Error error); diff --git a/app/src/main/java/app/fedilab/android/interfaces/ProgressListener.java b/app/src/main/java/app/fedilab/android/mastodon/interfaces/ProgressListener.java similarity index 63% rename from app/src/main/java/app/fedilab/android/interfaces/ProgressListener.java rename to app/src/main/java/app/fedilab/android/mastodon/interfaces/ProgressListener.java index 4d9bcd96..873a6b94 100644 --- a/app/src/main/java/app/fedilab/android/interfaces/ProgressListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/interfaces/ProgressListener.java @@ -1,4 +1,4 @@ -package app.fedilab.android.interfaces; +package app.fedilab.android.mastodon.interfaces; public interface ProgressListener { void onProgress(long transferred, long total); diff --git a/app/src/main/java/app/fedilab/android/jobs/ComposeWorker.java b/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java similarity index 96% rename from app/src/main/java/app/fedilab/android/jobs/ComposeWorker.java rename to app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java index 3e9f97be..7c23ef88 100644 --- a/app/src/main/java/app/fedilab/android/jobs/ComposeWorker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.jobs; +package app.fedilab.android.mastodon.jobs; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -50,18 +50,18 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.BaseAccount; -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; +import app.fedilab.android.mastodon.client.endpoints.MastodonStatusesService; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Poll; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.PostState; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; import okhttp3.MediaType; import okhttp3.MultipartBody; import okhttp3.OkHttpClient; diff --git a/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java b/app/src/main/java/app/fedilab/android/mastodon/jobs/NotificationsWorker.java similarity index 94% rename from app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java rename to app/src/main/java/app/fedilab/android/mastodon/jobs/NotificationsWorker.java index febdf22d..8e405468 100644 --- a/app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/jobs/NotificationsWorker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.jobs; +package app.fedilab.android.mastodon.jobs; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,10 +34,10 @@ import com.google.common.util.concurrent.ListenableFuture; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.NotificationsHelper; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.NotificationsHelper; public class NotificationsWorker extends Worker { diff --git a/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java b/app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleBoostWorker.java similarity index 94% rename from app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java rename to app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleBoostWorker.java index bf7fe38f..19462a7c 100644 --- a/app/src/main/java/app/fedilab/android/jobs/ScheduleBoostWorker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleBoostWorker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.jobs; +package app.fedilab.android.mastodon.jobs; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,11 +35,11 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -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 app.fedilab.android.mastodon.client.endpoints.MastodonStatusesService; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.ScheduledBoost; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java b/app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleThreadWorker.java similarity index 94% rename from app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java rename to app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleThreadWorker.java index e348f928..b5f4dcc8 100644 --- a/app/src/main/java/app/fedilab/android/jobs/ScheduleThreadWorker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/jobs/ScheduleThreadWorker.java @@ -1,4 +1,4 @@ -package app.fedilab.android.jobs; +package app.fedilab.android.mastodon.jobs; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,7 +14,7 @@ package app.fedilab.android.jobs; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.jobs.ComposeWorker.publishMessage; +import static app.fedilab.android.mastodon.jobs.ComposeWorker.publishMessage; import android.app.Notification; import android.app.NotificationChannel; @@ -33,9 +33,9 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; public class ScheduleThreadWorker extends Worker { diff --git a/app/src/main/java/app/fedilab/android/services/CustomReceiver.java b/app/src/main/java/app/fedilab/android/mastodon/services/CustomReceiver.java similarity index 93% rename from app/src/main/java/app/fedilab/android/services/CustomReceiver.java rename to app/src/main/java/app/fedilab/android/mastodon/services/CustomReceiver.java index a6eb6f77..e89837d1 100644 --- a/app/src/main/java/app/fedilab/android/services/CustomReceiver.java +++ b/app/src/main/java/app/fedilab/android/mastodon/services/CustomReceiver.java @@ -1,4 +1,4 @@ -package app.fedilab.android.services; +package app.fedilab.android.mastodon.services; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -23,8 +23,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.unifiedpush.android.connector.MessagingReceiver; -import app.fedilab.android.helper.NotificationsHelper; -import app.fedilab.android.helper.PushNotifications; +import app.fedilab.android.mastodon.helper.NotificationsHelper; +import app.fedilab.android.mastodon.helper.PushNotifications; public class CustomReceiver extends MessagingReceiver { diff --git a/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java b/app/src/main/java/app/fedilab/android/mastodon/services/ThreadMessageService.java similarity index 83% rename from app/src/main/java/app/fedilab/android/services/ThreadMessageService.java rename to app/src/main/java/app/fedilab/android/mastodon/services/ThreadMessageService.java index 9ec7469b..263eda13 100644 --- a/app/src/main/java/app/fedilab/android/services/ThreadMessageService.java +++ b/app/src/main/java/app/fedilab/android/mastodon/services/ThreadMessageService.java @@ -1,4 +1,4 @@ -package app.fedilab.android.services; +package app.fedilab.android.mastodon.services; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -15,12 +15,10 @@ package app.fedilab.android.services; * see . */ -import static app.fedilab.android.jobs.ComposeWorker.publishMessage; - import android.content.Context; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.jobs.ComposeWorker; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.jobs.ComposeWorker; public class ThreadMessageService { @@ -32,6 +30,6 @@ public class ThreadMessageService { dataPost.scheduledDate = scheduledDate; dataPost.statusDraft = statusDraft; dataPost.statusEditId = editMessageId; - publishMessage(context, dataPost); + ComposeWorker.publishMessage(context, dataPost); } } diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountAdapter.java index 7b36fefd..1adc4cd3 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -45,13 +45,13 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.ProfileActivity; -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; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountFollowRequestAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountFollowRequestAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java index 3f78548a..df254b24 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountFollowRequestAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,12 +35,12 @@ 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.entities.api.Account; import app.fedilab.android.databinding.DrawerFollowBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class AccountFollowRequestAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountListAdapter.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountListAdapter.java index 5f39f8d8..e2d3fdfe 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountListAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountListAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,13 +35,13 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class AccountListAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsReplyAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsReplyAdapter.java index c0b378bf..37a80357 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsReplyAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsReplyAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -23,9 +23,9 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.DrawerAccountReplyBinding; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class AccountsReplyAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchAdapter.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchAdapter.java index 40c7b697..d75f4faa 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.DrawerAccountSearchBinding; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class AccountsSearchAdapter extends ArrayAdapter implements Filterable { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchTopBarAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchTopBarAdapter.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchTopBarAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchTopBarAdapter.java index 6de07a1b..635ef0e1 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountsSearchTopBarAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountsSearchTopBarAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,9 +31,9 @@ import androidx.cursoradapter.widget.SimpleCursorAdapter; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.Helper; public class AccountsSearchTopBarAdapter extends SimpleCursorAdapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AnnouncementAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AnnouncementAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/AnnouncementAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AnnouncementAdapter.java index 21a759f3..ad4b962a 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AnnouncementAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AnnouncementAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -45,11 +45,11 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Announcement; -import app.fedilab.android.client.entities.api.Reaction; import app.fedilab.android.databinding.DrawerAnnouncementBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.AnnouncementsVM; +import app.fedilab.android.mastodon.client.entities.api.Announcement; +import app.fedilab.android.mastodon.client.entities.api.Reaction; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AnnouncementsVM; public class AnnouncementAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/CacheAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/CacheAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/CacheAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/CacheAdapter.java index 102492cb..1d57715c 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/CacheAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/CacheAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -24,10 +24,10 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.entities.app.CacheAccount; import app.fedilab.android.databinding.DrawerCacheBinding; -import app.fedilab.android.helper.CacheHelper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.entities.app.CacheAccount; +import app.fedilab.android.mastodon.helper.CacheHelper; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class CacheAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java index ad0afabf..0372043b 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -19,7 +19,7 @@ import static android.content.Context.INPUT_METHOD_SERVICE; import static app.fedilab.android.BaseMainActivity.currentAccount; import static app.fedilab.android.BaseMainActivity.emojis; import static app.fedilab.android.BaseMainActivity.instanceInfo; -import static app.fedilab.android.activities.ComposeActivity.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE; +import static app.fedilab.android.mastodon.activities.ComposeActivity.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE; import android.Manifest; import android.annotation.SuppressLint; @@ -100,32 +100,33 @@ 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.activities.MainActivity; -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.BaseAccount; -import app.fedilab.android.client.entities.app.Languages; -import app.fedilab.android.client.entities.app.Quotes; -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; import app.fedilab.android.databinding.DrawerStatusComposeBinding; import app.fedilab.android.databinding.DrawerStatusSimpleBinding; import app.fedilab.android.databinding.PopupMediaDescriptionBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.imageeditor.EditImageActivity; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.EmojiInstance; +import app.fedilab.android.mastodon.client.entities.api.Mention; +import app.fedilab.android.mastodon.client.entities.api.Poll; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.Languages; +import app.fedilab.android.mastodon.client.entities.app.Quotes; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.imageeditor.EditImageActivity; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; import es.dmoral.toasty.Toasty; @@ -156,7 +157,7 @@ public class ComposeAdapter extends RecyclerView.Adapter emojisList = new ArrayList<>(); private boolean unlisted_changed = false; - public ComposeAdapter(List statusList, int statusCount, BaseAccount account, app.fedilab.android.client.entities.api.Account mentionedAccount, String visibility, String editMessageId) { + public ComposeAdapter(List statusList, int statusCount, BaseAccount account, Account mentionedAccount, String visibility, String editMessageId) { this.statusList = statusList; this.statusCount = statusCount; this.account = account; @@ -768,7 +769,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.entities.api.Account account = accounts.get(position); + Account account = accounts.get(position); String deltaSearch = ""; //Less than 15 characters are written before the cursor position int searchLength = Math.min(currentCursorPosition, searchDeep); @@ -1848,13 +1849,15 @@ public class ComposeAdapter extends RecyclerView.Adapter { if (isChecked) { if (checkedId == R.id.poll_type_single) { - if (statusDraft != null && statusDraft.poll != null) statusDraft.poll.multiple = false; + if (statusDraft != null && statusDraft.poll != null) + statusDraft.poll.multiple = false; for (int i = 0; i < composePollBinding.optionsList.getChildCount(); i++) { ComposePollItemBinding child = ComposePollItemBinding.bind(composePollBinding.optionsList.getChildAt(i)); child.typeIndicator.setImageResource(R.drawable.ic_compose_poll_option_mark_single); } } else if (checkedId == R.id.poll_type_multiple) { - if (statusDraft != null && statusDraft.poll != null) statusDraft.poll.multiple = true; + if (statusDraft != null && statusDraft.poll != null) + statusDraft.poll.multiple = true; for (int i = 0; i < composePollBinding.optionsList.getChildCount(); i++) { ComposePollItemBinding child = ComposePollItemBinding.bind(composePollBinding.optionsList.getChildAt(i)); child.typeIndicator.setImageResource(R.drawable.ic_compose_poll_option_mark_multiple); diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ConversationAdapter.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ConversationAdapter.java index 2defcdb7..01e1e76d 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ConversationAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ConversationAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -44,15 +44,15 @@ import java.util.Timer; import java.util.TimerTask; import app.fedilab.android.R; -import app.fedilab.android.activities.ContextActivity; -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; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Conversation; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class ConversationAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/DomainBlockAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/DomainBlockAdapter.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/drawer/DomainBlockAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/DomainBlockAdapter.java index c28b04be..50d4e0bf 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/DomainBlockAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/DomainBlockAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,8 +34,8 @@ import java.util.List; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; import app.fedilab.android.databinding.DrawerDomainBlockBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class DomainBlockAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiAdapter.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiAdapter.java index 7a3819ca..0ef36830 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -29,8 +29,8 @@ import com.bumptech.glide.Glide; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Emoji; import app.fedilab.android.databinding.DrawerEmojiPickerBinding; +import app.fedilab.android.mastodon.client.entities.api.Emoji; public class EmojiAdapter extends BaseAdapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiSearchAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiSearchAdapter.java index a61fb7cb..9c59126d 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/EmojiSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/EmojiSearchAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -33,8 +33,8 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Emoji; import app.fedilab.android.databinding.DrawerEmojiSearchBinding; +import app.fedilab.android.mastodon.client.entities.api.Emoji; public class EmojiSearchAdapter extends ArrayAdapter implements Filterable { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/FieldAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FieldAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/FieldAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FieldAdapter.java index f3056645..ea432b0a 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/FieldAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FieldAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,9 +29,9 @@ import java.lang.ref.WeakReference; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Field; import app.fedilab.android.databinding.DrawerFieldBinding; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Field; public class FieldAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FilterAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FilterAdapter.java index ca342969..a19b357f 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/FilterAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FilterAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,11 +31,11 @@ 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.entities.api.Filter; import app.fedilab.android.databinding.DrawerFilterBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.FiltersVM; +import app.fedilab.android.mastodon.activities.FilterActivity; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM; public class FilterAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/FollowedTagAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FollowedTagAdapter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/drawer/FollowedTagAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FollowedTagAdapter.java index 11dc4d76..2bb0b32c 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/FollowedTagAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/FollowedTagAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,8 +22,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.DrawerListBinding; +import app.fedilab.android.mastodon.client.entities.api.Tag; public class FollowedTagAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/IdentityProofsAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/IdentityProofsAdapter.java index 6672249e..e77d75c8 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/IdentityProofsAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/IdentityProofsAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -24,9 +24,9 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.IdentityProof; import app.fedilab.android.databinding.DrawerIdentityProofsBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.api.IdentityProof; +import app.fedilab.android.mastodon.helper.Helper; public class IdentityProofsAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ImageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ImageAdapter.java similarity index 85% rename from app/src/main/java/app/fedilab/android/ui/drawer/ImageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ImageAdapter.java index 29da9843..9b4304ed 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ImageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ImageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,8 +14,6 @@ package app.fedilab.android.ui.drawer; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.ui.fragment.media.FragmentMediaProfile.mediaAttachmentProfile; - import android.app.Activity; import android.content.Context; import android.content.Intent; @@ -29,11 +27,12 @@ import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; -import app.fedilab.android.activities.ContextActivity; -import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.client.entities.api.Attachment; import app.fedilab.android.databinding.DrawerMediaBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.media.FragmentMediaProfile; public class ImageAdapter extends RecyclerView.Adapter { @@ -44,11 +43,11 @@ public class ImageAdapter extends RecyclerView.Adapter } public int getCount() { - return mediaAttachmentProfile.size(); + return FragmentMediaProfile.mediaAttachmentProfile.size(); } public Attachment getItem(int position) { - return mediaAttachmentProfile.get(position); + return FragmentMediaProfile.mediaAttachmentProfile.get(position); } @NonNull @@ -62,7 +61,7 @@ public class ImageAdapter extends RecyclerView.Adapter @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { - Attachment attachment = mediaAttachmentProfile.get(position); + Attachment attachment = FragmentMediaProfile.mediaAttachmentProfile.get(position); final ViewHolder holder = (ViewHolder) viewHolder; if (Helper.isValidContextForGlide(context) && attachment != null) { if (attachment.preview_url != null) { @@ -107,7 +106,7 @@ public class ImageAdapter extends RecyclerView.Adapter @Override public int getItemCount() { - return mediaAttachmentProfile.size(); + return FragmentMediaProfile.mediaAttachmentProfile.size(); } diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/InstanceRegAdapter.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/InstanceRegAdapter.java index f58954cb..287e17c4 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/InstanceRegAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/InstanceRegAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -33,9 +33,9 @@ import com.bumptech.glide.request.RequestOptions; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.JoinMastodonInstance; import app.fedilab.android.databinding.DrawerInstanceRegBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.entities.api.JoinMastodonInstance; +import app.fedilab.android.mastodon.helper.Helper; public class InstanceRegAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/KeywordAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/KeywordAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/KeywordAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/KeywordAdapter.java index d0cb8814..fb9f6164 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/KeywordAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/KeywordAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -27,8 +27,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Filter; import app.fedilab.android.databinding.DrawerKeywordBinding; +import app.fedilab.android.mastodon.client.entities.api.Filter; public class KeywordAdapter extends RecyclerView.Adapter { private final List keywordsParamsList; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/MastodonListAdapter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/MastodonListAdapter.java index 0d1d1a72..f815ffaf 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/MastodonListAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/MastodonListAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,8 +22,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; -import app.fedilab.android.client.entities.api.MastodonList; import app.fedilab.android.databinding.DrawerListBinding; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; public class MastodonListAdapter extends RecyclerView.Adapter { private final List mastodonListList; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/NotificationAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/NotificationAdapter.java index f3b2af69..3b779d53 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/NotificationAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.ui.drawer; * see . */ -import static app.fedilab.android.ui.drawer.StatusAdapter.statusManagement; +import static app.fedilab.android.mastodon.ui.drawer.StatusAdapter.statusManagement; import android.app.Activity; import android.content.Context; @@ -42,19 +42,19 @@ import java.util.Locale; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.ProfileActivity; -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.DrawerStatusFilteredBinding; import app.fedilab.android.databinding.DrawerStatusFilteredHideBinding; import app.fedilab.android.databinding.DrawerStatusNotificationBinding; import app.fedilab.android.databinding.NotificationsRelatedAccountsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class NotificationAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReactionAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReactionAdapter.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/drawer/ReactionAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReactionAdapter.java index 91048d2d..56777244 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReactionAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReactionAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,12 +29,12 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Reaction; import app.fedilab.android.databinding.DrawerReactionBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.viewmodel.mastodon.AnnouncementsVM; -import app.fedilab.android.viewmodel.pleroma.ActionsVM; +import app.fedilab.android.mastodon.client.entities.api.Reaction; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AnnouncementsVM; +import app.fedilab.android.mastodon.viewmodel.pleroma.ActionsVM; /** diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReleaseNoteAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReleaseNoteAdapter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/drawer/ReleaseNoteAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReleaseNoteAdapter.java index 65353d33..8334f842 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReleaseNoteAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReleaseNoteAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import java.util.List; import java.util.Locale; import app.fedilab.android.R; -import app.fedilab.android.client.entities.app.ReleaseNote; import app.fedilab.android.databinding.DrawerReleaseNoteBinding; -import app.fedilab.android.helper.TranslateHelper; +import app.fedilab.android.mastodon.client.entities.app.ReleaseNote; +import app.fedilab.android.mastodon.helper.TranslateHelper; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderBottomMenuAdapter.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderBottomMenuAdapter.java index 052a5c67..9cc09a32 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderBottomMenuAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderBottomMenuAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,13 +28,13 @@ import org.jetbrains.annotations.NotNull; import java.util.Collections; import app.fedilab.android.R; -import app.fedilab.android.activities.ReorderTimelinesActivity; -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; -import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperViewHolder; -import app.fedilab.android.helper.itemtouchhelper.OnStartDragListener; +import app.fedilab.android.mastodon.activities.ReorderTimelinesActivity; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.itemtouchhelper.ItemTouchHelperAdapter; +import app.fedilab.android.mastodon.helper.itemtouchhelper.ItemTouchHelperViewHolder; +import app.fedilab.android.mastodon.helper.itemtouchhelper.OnStartDragListener; /** diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java index e0619cde..31b82d7c 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,18 +35,18 @@ import java.util.Collections; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.ReorderTimelinesActivity; -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.DrawerReorderBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperAdapter; -import app.fedilab.android.helper.itemtouchhelper.ItemTouchHelperViewHolder; -import app.fedilab.android.helper.itemtouchhelper.OnStartDragListener; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.activities.ReorderTimelinesActivity; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.RemoteInstance; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.itemtouchhelper.ItemTouchHelperAdapter; +import app.fedilab.android.mastodon.helper.itemtouchhelper.ItemTouchHelperViewHolder; +import app.fedilab.android.mastodon.helper.itemtouchhelper.OnStartDragListener; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; /** diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/RulesAdapter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/RulesAdapter.java index 24b95a1e..e20d2a6f 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/RulesAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/RulesAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -23,8 +23,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.entities.api.Instance; import app.fedilab.android.databinding.DrawerCheckboxBinding; +import app.fedilab.android.mastodon.client.entities.api.Instance; public class RulesAdapter extends RecyclerView.Adapter { private final List ruleList; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/SliderAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SliderAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/SliderAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SliderAdapter.java index e34051b7..0cf829bd 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/SliderAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SliderAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2023 Thomas Schneider * * This file is a part of Fedilab @@ -34,11 +34,11 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.DrawerSliderBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; import jp.wasabeef.glide.transformations.BlurTransformation; public class SliderAdapter extends SliderViewAdapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index 849d5873..bfda3bd8 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -24,11 +24,11 @@ import static app.fedilab.android.BaseMainActivity.regex_public; import static app.fedilab.android.BaseMainActivity.show_boosts; import static app.fedilab.android.BaseMainActivity.show_dms; import static app.fedilab.android.BaseMainActivity.show_replies; -import static app.fedilab.android.activities.ContextActivity.expand; -import static app.fedilab.android.helper.Helper.ARG_TIMELINE_REFRESH_ALL; -import static app.fedilab.android.helper.Helper.PREF_USER_ID; -import static app.fedilab.android.helper.Helper.PREF_USER_INSTANCE; -import static app.fedilab.android.helper.Helper.PREF_USER_TOKEN; +import static app.fedilab.android.mastodon.activities.ContextActivity.expand; +import static app.fedilab.android.mastodon.helper.Helper.ARG_TIMELINE_REFRESH_ALL; +import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_ID; +import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_INSTANCE; +import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_TOKEN; import android.annotation.SuppressLint; import android.app.Activity; @@ -106,25 +106,7 @@ 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.activities.ContextActivity; -import app.fedilab.android.activities.CustomSharingActivity; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.activities.MediaActivity; -import app.fedilab.android.activities.ProfileActivity; -import app.fedilab.android.activities.ReportActivity; -import app.fedilab.android.activities.StatusHistoryActivity; -import app.fedilab.android.activities.StatusInfoActivity; -import app.fedilab.android.activities.admin.AdminAccountActivity; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Poll; -import app.fedilab.android.client.entities.api.Reaction; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.client.entities.app.Account; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.DrawerFetchMoreBinding; import app.fedilab.android.databinding.DrawerStatusArtBinding; import app.fedilab.android.databinding.DrawerStatusBinding; @@ -136,24 +118,42 @@ import app.fedilab.android.databinding.DrawerStatusPixelfedBinding; import app.fedilab.android.databinding.DrawerStatusReportBinding; import app.fedilab.android.databinding.LayoutMediaBinding; import app.fedilab.android.databinding.LayoutPollItemBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.GlideApp; -import app.fedilab.android.helper.GlideFocus; -import app.fedilab.android.helper.GlideRequests; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.LongClickLinkMovementMethod; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.MediaHelper; -import app.fedilab.android.helper.SpannableHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.helper.TimelineHelper; -import app.fedilab.android.helper.TranslateHelper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonContext; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; -import app.fedilab.android.viewmodel.pleroma.ActionsVM; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.activities.CustomSharingActivity; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.activities.ReportActivity; +import app.fedilab.android.mastodon.activities.StatusHistoryActivity; +import app.fedilab.android.mastodon.activities.StatusInfoActivity; +import app.fedilab.android.mastodon.activities.admin.AdminAccountActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Poll; +import app.fedilab.android.mastodon.client.entities.api.Reaction; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.GlideApp; +import app.fedilab.android.mastodon.helper.GlideFocus; +import app.fedilab.android.mastodon.helper.GlideRequests; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.LongClickLinkMovementMethod; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.MediaHelper; +import app.fedilab.android.mastodon.helper.SpannableHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.helper.TimelineHelper; +import app.fedilab.android.mastodon.helper.TranslateHelper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonContext; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.viewmodel.pleroma.ActionsVM; import de.timfreiheit.mathjax.android.MathJaxConfig; import de.timfreiheit.mathjax.android.MathJaxView; import es.dmoral.toasty.Toasty; @@ -1969,7 +1969,7 @@ public class StatusAdapter extends RecyclerView.Adapter try { List accounts = new Account(context).getCrossAccounts(); if (accounts.size() > 1) { - List accountList = new ArrayList<>(); + List accountList = new ArrayList<>(); for (BaseAccount account : accounts) { accountList.add(account.mastodon_account); } diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDraftAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDraftAdapter.java index 16d11141..fed15714 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusDraftAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDraftAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,13 +35,13 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.ComposeActivity; -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; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; public class StatusDraftAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusHistoryAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusHistoryAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/StatusHistoryAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusHistoryAdapter.java index 33dd4c86..96628a86 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusHistoryAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusHistoryAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -27,10 +27,10 @@ import java.lang.ref.WeakReference; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.databinding.DrawerStatusHistoryBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class StatusHistoryAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusReportAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusReportAdapter.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/drawer/StatusReportAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusReportAdapter.java index dddf9e86..ba539c46 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusReportAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusReportAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java index 96a73f1f..6b35d85f 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusScheduledAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -41,14 +41,14 @@ 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.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; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.activities.ComposeActivity; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.app.ScheduledBoost; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class StatusScheduledAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/SuggestionAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SuggestionAdapter.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/drawer/SuggestionAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SuggestionAdapter.java index 4c6289b7..80119bec 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/SuggestionAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/SuggestionAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -37,13 +37,13 @@ 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.entities.api.Account; -import app.fedilab.android.client.entities.api.Suggestion; import app.fedilab.android.databinding.DrawerSuggestionBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.activities.ProfileActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Suggestion; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class SuggestionAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagAdapter.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagAdapter.java index 58c9969f..81e1b67c 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TagAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -37,11 +37,11 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.HashTagActivity; -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; +import app.fedilab.android.mastodon.activities.HashTagActivity; +import app.fedilab.android.mastodon.client.entities.api.History; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.helper.Helper; public class TagAdapter extends RecyclerView.Adapter { private final List tagList; diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TagSearchTopBarAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagSearchTopBarAdapter.java similarity index 91% rename from app/src/main/java/app/fedilab/android/ui/drawer/TagSearchTopBarAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagSearchTopBarAdapter.java index 3b36f659..eeef0033 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TagSearchTopBarAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagSearchTopBarAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import androidx.cursoradapter.widget.SimpleCursorAdapter; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.HashTagActivity; -import app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.activities.HashTagActivity; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.helper.Helper; public class TagSearchTopBarAdapter extends SimpleCursorAdapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagsSearchAdapter.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagsSearchAdapter.java index 304d700d..1de85313 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/TagsSearchAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/TagsSearchAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer; +package app.fedilab.android.mastodon.ui.drawer; import android.content.Context; import android.view.LayoutInflater; @@ -14,8 +14,8 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.client.entities.api.Tag; import app.fedilab.android.databinding.DrawerTagSearchBinding; +import app.fedilab.android.mastodon.client.entities.api.Tag; /* Copyright 2021 Thomas Schneider * diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminAccountAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminAccountAdapter.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminAccountAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminAccountAdapter.java index 772c5585..98967224 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminAccountAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminAccountAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer.admin; +package app.fedilab.android.mastodon.ui.drawer.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,11 +31,11 @@ import java.util.List; import java.util.Locale; import app.fedilab.android.R; -import app.fedilab.android.activities.admin.AdminAccountActivity; -import app.fedilab.android.client.entities.api.admin.AdminAccount; import app.fedilab.android.databinding.DrawerAdminAccountBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.activities.admin.AdminAccountActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class AdminAccountAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminDomainAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminDomainAdapter.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminDomainAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminDomainAdapter.java index bee4ccee..f9653a22 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/admin/AdminDomainAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/AdminDomainAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer.admin; +package app.fedilab.android.mastodon.ui.drawer.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,10 +28,10 @@ import org.jetbrains.annotations.NotNull; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.admin.AdminDomainBlockActivity; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; import app.fedilab.android.databinding.DrawerAdminDomainBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.activities.admin.AdminDomainBlockActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.helper.Helper; public class AdminDomainAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/admin/ReportAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/ReportAdapter.java similarity index 91% rename from app/src/main/java/app/fedilab/android/ui/drawer/admin/ReportAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/ReportAdapter.java index 34dedb56..75b17e82 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/admin/ReportAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/admin/ReportAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.drawer.admin; +package app.fedilab.android.mastodon.ui.drawer.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -29,12 +29,12 @@ import org.jetbrains.annotations.NotNull; import java.lang.ref.WeakReference; import java.util.List; -import app.fedilab.android.activities.AccountReportActivity; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.admin.AdminReport; import app.fedilab.android.databinding.DrawerReportBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.activities.AccountReportActivity; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReport; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; public class ReportAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminAccount.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminAccount.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminAccount.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminAccount.java index 08bad0c1..90e02138 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminAccount.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.admin; +package app.fedilab.android.mastodon.ui.fragment.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,15 +33,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.admin.AdminActionActivity; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminAccounts; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.admin.AdminAccountAdapter; -import app.fedilab.android.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.activities.admin.AdminActionActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccounts; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.admin.AdminAccountAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; public class FragmentAdminAccount extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminDomain.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminDomain.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminDomain.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminDomain.java index 57a9f0fb..b5c24ece 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminDomain.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminDomain.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.admin; +package app.fedilab.android.mastodon.ui.fragment.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -34,14 +34,14 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.admin.AdminDomainBlockActivity; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlocks; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.admin.AdminDomainAdapter; -import app.fedilab.android.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.activities.admin.AdminDomainBlockActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlocks; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.admin.AdminDomainAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; public class FragmentAdminDomain extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminReport.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminReport.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminReport.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminReport.java index 8f8cc33b..dc3834d8 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/admin/FragmentAdminReport.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/admin/FragmentAdminReport.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.admin; +package app.fedilab.android.mastodon.ui.fragment.admin; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,14 +33,14 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.admin.AdminActionActivity; -import app.fedilab.android.client.entities.api.admin.AdminReport; -import app.fedilab.android.client.entities.api.admin.AdminReports; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ThemeHelper; -import app.fedilab.android.ui.drawer.admin.ReportAdapter; -import app.fedilab.android.viewmodel.mastodon.AdminVM; +import app.fedilab.android.mastodon.activities.admin.AdminActionActivity; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReport; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReports; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ThemeHelper; +import app.fedilab.android.mastodon.ui.drawer.admin.ReportAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AdminVM; public class FragmentAdminReport extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java index f12ef94a..498f6aea 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMedia.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.media; +package app.fedilab.android.mastodon.ui.fragment.media; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -51,12 +51,12 @@ import com.r0adkll.slidr.model.SlidrListener; import com.r0adkll.slidr.model.SlidrPosition; import app.fedilab.android.R; -import app.fedilab.android.activities.MediaActivity; -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; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.activities.MediaActivity; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.helper.CacheDataSourceFactory; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class FragmentMedia extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMediaProfile.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMediaProfile.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMediaProfile.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMediaProfile.java index 39193f5e..ccf6a115 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/media/FragmentMediaProfile.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMediaProfile.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.media; +package app.fedilab.android.mastodon.ui.fragment.media; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,21 +31,22 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -import app.fedilab.android.client.entities.api.Status; -import app.fedilab.android.client.entities.api.Statuses; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.ImageAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Statuses; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.ImageAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; import es.dmoral.toasty.Toasty; public class FragmentMediaProfile extends Fragment { + public static List mediaAttachmentProfile; String tempToken; String tempInstance; private FragmentPaginationBinding binding; @@ -57,8 +58,6 @@ public class FragmentMediaProfile extends Fragment { private ImageAdapter imageAdapter; private boolean checkRemotely; private String accountId; - public static List mediaAttachmentProfile; - @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentComposeSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentComposeSettings.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentComposeSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentComposeSettings.java index 0527f08f..3c864f71 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentComposeSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentComposeSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -25,7 +25,7 @@ import androidx.preference.SwitchPreferenceCompat; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentComposeSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomDarkSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomDarkSettings.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomDarkSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomDarkSettings.java index 7a1e3772..70eee0f1 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomDarkSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomDarkSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomLightSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomLightSettings.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomLightSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomLightSettings.java index d35e5cf8..e614c1a0 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentCustomLightSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentCustomLightSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentExtraFeaturesSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentExtraFeaturesSettings.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentExtraFeaturesSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentExtraFeaturesSettings.java index d30b5e03..4eba0c6f 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentExtraFeaturesSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentExtraFeaturesSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -25,7 +25,7 @@ import androidx.preference.SwitchPreferenceCompat; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentExtraFeaturesSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentInterfaceSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentInterfaceSettings.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentInterfaceSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentInterfaceSettings.java index 998db577..227bb167 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentInterfaceSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentInterfaceSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -14,7 +14,7 @@ package app.fedilab.android.ui.fragment.settings; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.helper.LogoHelper.setDrawable; +import static app.fedilab.android.mastodon.helper.LogoHelper.setDrawable; import android.content.ComponentName; import android.content.Context; @@ -32,8 +32,8 @@ import androidx.preference.SwitchPreferenceCompat; import app.fedilab.android.BuildConfig; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.LogoHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.LogoHelper; import es.dmoral.toasty.Toasty; public class FragmentInterfaceSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentLanguageSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentLanguageSettings.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentLanguageSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentLanguageSettings.java index dba3431c..17313dab 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentLanguageSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentLanguageSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -24,7 +24,7 @@ import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceManager; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentLanguageSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentNotificationsSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentNotificationsSettings.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentNotificationsSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentNotificationsSettings.java index 56427025..467e9c75 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentNotificationsSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentNotificationsSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -36,10 +36,10 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.PushHelper; -import app.fedilab.android.helper.settings.TimePreference; -import app.fedilab.android.helper.settings.TimePreferenceDialogFragment; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.PushHelper; +import app.fedilab.android.mastodon.helper.settings.TimePreference; +import app.fedilab.android.mastodon.helper.settings.TimePreferenceDialogFragment; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentPrivacySettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentPrivacySettings.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentPrivacySettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentPrivacySettings.java index aa8be58f..fefc7ce8 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentPrivacySettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentPrivacySettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,7 +22,7 @@ import androidx.preference.EditTextPreference; import androidx.preference.PreferenceFragmentCompat; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentPrivacySettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentSettingsCategories.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentSettingsCategories.java index a1f32db3..f67e940f 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentSettingsCategories.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -35,8 +35,8 @@ import androidx.preference.PreferenceFragmentCompat; import java.io.IOException; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.ZipHelper; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.ZipHelper; import es.dmoral.toasty.Toasty; public class FragmentSettingsCategories extends PreferenceFragmentCompat { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java index 61ced816..2f86022b 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentThemingSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,7 +28,7 @@ import androidx.preference.PreferenceFragmentCompat; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import app.fedilab.android.R; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; import es.dmoral.toasty.Toasty; public class FragmentThemingSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentTimelinesSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentTimelinesSettings.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentTimelinesSettings.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentTimelinesSettings.java index 05606bc6..0bdddba4 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentTimelinesSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentTimelinesSettings.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.settings; +package app.fedilab.android.mastodon.ui.fragment.settings; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -26,7 +26,7 @@ import androidx.preference.SwitchPreferenceCompat; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentTimelinesSettings extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAccount.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAccount.java index e8270311..d0567bc7 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAccount.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAccount.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -15,7 +15,7 @@ package app.fedilab.android.ui.fragment.timeline; * see . */ -import static app.fedilab.android.helper.MastodonHelper.ACCOUNTS_PER_CALL; +import static app.fedilab.android.mastodon.helper.MastodonHelper.ACCOUNTS_PER_CALL; import android.os.Bundle; import android.view.LayoutInflater; @@ -35,18 +35,18 @@ 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.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; -import app.fedilab.android.ui.drawer.AccountAdapter; -import app.fedilab.android.ui.pageadapter.FedilabProfileTLPageAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Accounts; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.AccountAdapter; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabProfileTLPageAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAnnouncement.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAnnouncement.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAnnouncement.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAnnouncement.java index d2407698..38701d1d 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonAnnouncement.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonAnnouncement.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,10 +28,10 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Announcement; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.ui.drawer.AnnouncementAdapter; -import app.fedilab.android.viewmodel.mastodon.AnnouncementsVM; +import app.fedilab.android.mastodon.client.entities.api.Announcement; +import app.fedilab.android.mastodon.ui.drawer.AnnouncementAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AnnouncementsVM; public class FragmentMastodonAnnouncement extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonContext.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonContext.java index 0e3352de..e2826cef 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonContext.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -14,8 +14,8 @@ package app.fedilab.android.ui.fragment.timeline; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.activities.ContextActivity.displayCW; -import static app.fedilab.android.activities.ContextActivity.expand; +import static app.fedilab.android.mastodon.activities.ContextActivity.displayCW; +import static app.fedilab.android.mastodon.activities.ContextActivity.expand; import android.content.BroadcastReceiver; import android.content.Intent; @@ -35,16 +35,16 @@ import java.util.ArrayList; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.activities.ContextActivity; import app.fedilab.android.activities.MainActivity; -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; -import app.fedilab.android.ui.drawer.StatusAdapter; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.activities.ContextActivity; +import app.fedilab.android.mastodon.client.entities.api.Context; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.DividerDecoration; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class FragmentMastodonContext extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java index 2b59c69f..0000131b 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonConversation.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -35,16 +35,16 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Conversation; -import app.fedilab.android.client.entities.api.Conversations; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.ConversationAdapter; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Conversation; +import app.fedilab.android.mastodon.client.entities.api.Conversations; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.ConversationAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class FragmentMastodonConversation extends Fragment implements ConversationAdapter.FetchMoreCallBack { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonDomainBlock.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonDomainBlock.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonDomainBlock.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonDomainBlock.java index 038ccaf2..9674611c 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonDomainBlock.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonDomainBlock.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -32,10 +32,10 @@ import java.util.List; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -import app.fedilab.android.client.entities.api.Domains; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.ui.drawer.DomainBlockAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Domains; +import app.fedilab.android.mastodon.ui.drawer.DomainBlockAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class FragmentMastodonDomainBlock extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java index 0404fc1d..080c2946 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -42,18 +42,18 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.NotificationAdapter; -import app.fedilab.android.viewmodel.mastodon.NotificationsVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Notifications; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.NotificationAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.NotificationsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class FragmentMastodonNotification extends Fragment implements NotificationAdapter.FetchMoreCallBack { @@ -64,18 +64,6 @@ public class FragmentMastodonNotification extends Fragment implements Notificati private boolean flagLoading; private List notificationList; private NotificationAdapter notificationAdapter; - private final BroadcastReceiver receive_refresh = new BroadcastReceiver() { - - @Override - public void onReceive(Context context, Intent intent) { - if (notificationType != null && notificationType == NotificationTypeEnum.ALL) { - if (notificationList != null && notificationList.size() > 0) { - route(FragmentMastodonTimeline.DIRECTION.FETCH_NEW, true); - } - } - } - }; - private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -116,13 +104,23 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } } }; - private boolean isViewInitialized; private Notifications initialNotifications; private String max_id, min_id, min_id_fetch_more, max_id_fetch_more; private LinearLayoutManager mLayoutManager; private NotificationTypeEnum notificationType; private boolean aggregateNotification; + private final BroadcastReceiver receive_refresh = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + if (notificationType != null && notificationType == NotificationTypeEnum.ALL) { + if (notificationList != null && notificationList.size() > 0) { + route(FragmentMastodonTimeline.DIRECTION.FETCH_NEW, true); + } + } + } + }; //Allow to recreate data when detaching/attaching fragment public void recreate() { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonSuggestion.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonSuggestion.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonSuggestion.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonSuggestion.java index f82eb52c..64eafe2e 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonSuggestion.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonSuggestion.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -31,11 +31,11 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Suggestion; -import app.fedilab.android.client.entities.api.Suggestions; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.ui.drawer.SuggestionAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.client.entities.api.Suggestion; +import app.fedilab.android.mastodon.client.entities.api.Suggestions; +import app.fedilab.android.mastodon.ui.drawer.SuggestionAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; public class FragmentMastodonSuggestion extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTag.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTag.java index 97af1720..24dcc9ee 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTag.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTag.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,15 +33,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.SearchResultTabActivity; -import app.fedilab.android.client.entities.api.Tag; -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; -import app.fedilab.android.ui.drawer.TagAdapter; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.activities.SearchResultTabActivity; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.TagAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; public class FragmentMastodonTag extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java similarity index 97% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java index da9dd25b..5202d4c3 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -49,27 +49,27 @@ 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.api.Account; -import app.fedilab.android.client.entities.api.Attachment; -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.BubbleTimeline; -import app.fedilab.android.client.entities.app.PinnedTimeline; -import app.fedilab.android.client.entities.app.RemoteInstance; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.TagTimeline; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentPaginationBinding; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.CrossActionHelper; -import app.fedilab.android.helper.GlideApp; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.StatusAdapter; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.SearchVM; -import app.fedilab.android.viewmodel.mastodon.TimelinesVM; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Statuses; +import app.fedilab.android.mastodon.client.entities.app.BubbleTimeline; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.RemoteInstance; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.TagTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.CrossActionHelper; +import app.fedilab.android.mastodon.helper.GlideApp; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.SearchVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.TimelinesVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentNotificationContainer.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java similarity index 98% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentNotificationContainer.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java index 09162704..da2c367f 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentNotificationContainer.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -44,9 +44,9 @@ import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; import app.fedilab.android.databinding.FragmentNotificationContainerBinding; import app.fedilab.android.databinding.PopupNotificationSettingsBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.pageadapter.FedilabNotificationPageAdapter; -import app.fedilab.android.viewmodel.mastodon.NotificationsVM; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabNotificationPageAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.NotificationsVM; import es.dmoral.toasty.Toasty; diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentProfileTimeline.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentProfileTimeline.java index a7a27092..ef3b1e32 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentProfileTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentProfileTimeline.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -26,10 +26,10 @@ import androidx.fragment.app.Fragment; import com.google.android.material.tabs.TabLayout; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.Account; import app.fedilab.android.databinding.FragmentProfileTimelinesBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.pageadapter.FedilabProfilePageAdapter; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.pageadapter.FedilabProfilePageAdapter; public class FragmentProfileTimeline extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentScheduled.java similarity index 92% rename from app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentScheduled.java index 12d04d29..48021ef5 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentScheduled.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentScheduled.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.timeline; +package app.fedilab.android.mastodon.ui.fragment.timeline; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -33,15 +33,15 @@ import java.util.List; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.ui.drawer.StatusScheduledAdapter; -import app.fedilab.android.viewmodel.mastodon.StatusesVM; +import app.fedilab.android.mastodon.client.entities.app.ScheduledBoost; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.StatusScheduledAdapter; +import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class FragmentScheduled extends Fragment implements StatusScheduledAdapter.ScheduledActions { diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabNotificationPageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabNotificationPageAdapter.java similarity index 95% rename from app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabNotificationPageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabNotificationPageAdapter.java index b9ec991f..57c90774 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabNotificationPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabNotificationPageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.pageadapter; +package app.fedilab.android.mastodon.ui.pageadapter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,8 +22,8 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonNotification; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonNotification; public class FedilabNotificationPageAdapter extends FragmentStatePagerAdapter { private final boolean extended; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabPageAdapter.java similarity index 90% rename from app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabPageAdapter.java index 326b3c65..342dd420 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabPageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.pageadapter; +package app.fedilab.android.mastodon.ui.pageadapter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -27,15 +27,15 @@ import androidx.preference.PreferenceManager; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -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.helper.PinnedTimelineHelper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.PinnedTimelineHelper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonConversation; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentNotificationContainer; @SuppressWarnings("deprecation") public class FedilabPageAdapter extends FragmentStatePagerAdapter { diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfilePageAdapter.java similarity index 90% rename from app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfilePageAdapter.java index 6d7a10e3..dc1c747d 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfilePageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfilePageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.pageadapter; +package app.fedilab.android.mastodon.ui.pageadapter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,11 +22,11 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -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.media.FragmentMediaProfile; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.media.FragmentMediaProfile; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; public class FedilabProfilePageAdapter extends FragmentStatePagerAdapter { private final Account account; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfileTLPageAdapter.java similarity index 88% rename from app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfileTLPageAdapter.java index 582aa9d4..748b01ae 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabProfileTLPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabProfileTLPageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.pageadapter; +package app.fedilab.android.mastodon.ui.pageadapter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,11 +22,11 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -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; -import app.fedilab.android.ui.fragment.timeline.FragmentProfileTimeline; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonAccount; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentProfileTimeline; public class FedilabProfileTLPageAdapter extends FragmentStatePagerAdapter { private final Account account; diff --git a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabScheduledPageAdapter.java similarity index 90% rename from app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java rename to app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabScheduledPageAdapter.java index 916860bd..9045d8e2 100644 --- a/app/src/main/java/app/fedilab/android/ui/pageadapter/FedilabScheduledPageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/pageadapter/FedilabScheduledPageAdapter.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.pageadapter; +package app.fedilab.android.mastodon.ui.pageadapter; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -22,9 +22,9 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.fragment.timeline.FragmentScheduled; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentScheduled; public class FedilabScheduledPageAdapter extends FragmentStatePagerAdapter { private Fragment mCurrentFragment; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AccountsVM.java similarity index 96% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AccountsVM.java index b33897a4..86b86c20 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AccountsVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AccountsVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -14,10 +14,6 @@ package app.fedilab.android.viewmodel.mastodon; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ -import static app.fedilab.android.helper.Helper.addMutedAccount; -import static app.fedilab.android.helper.Helper.removeMutedAccount; -import static app.fedilab.android.ui.drawer.StatusAdapter.sendAction; - import android.app.Application; import android.net.Uri; import android.os.Handler; @@ -34,33 +30,34 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -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.Domains; -import app.fedilab.android.client.entities.api.FamiliarFollowers; -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.Suggestion; -import app.fedilab.android.client.entities.api.Suggestions; -import app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.client.entities.api.Token; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.MutedAccounts; -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; +import app.fedilab.android.mastodon.client.endpoints.MastodonAccountsService; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Accounts; +import app.fedilab.android.mastodon.client.entities.api.Domains; +import app.fedilab.android.mastodon.client.entities.api.FamiliarFollowers; +import app.fedilab.android.mastodon.client.entities.api.FeaturedTag; +import app.fedilab.android.mastodon.client.entities.api.Field; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.client.entities.api.IdentityProof; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Preferences; +import app.fedilab.android.mastodon.client.entities.api.RelationShip; +import app.fedilab.android.mastodon.client.entities.api.Report; +import app.fedilab.android.mastodon.client.entities.api.Source; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Statuses; +import app.fedilab.android.mastodon.client.entities.api.Suggestion; +import app.fedilab.android.mastodon.client.entities.api.Suggestions; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.api.Token; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.MutedAccounts; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.ui.drawer.StatusAdapter; import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import retrofit2.Call; @@ -680,7 +677,7 @@ public class AccountsVM extends AndroidViewModel { Response blockResponse = blockCall.execute(); if (blockResponse.isSuccessful()) { relationShip = blockResponse.body(); - sendAction(getApplication().getApplicationContext(), Helper.ARG_DELETE_ALL_FOR_ACCOUNT_ID, null, id); + StatusAdapter.sendAction(getApplication().getApplicationContext(), Helper.ARG_DELETE_ALL_FOR_ACCOUNT_ID, null, id); new StatusCache(getApplication().getApplicationContext()).deleteStatusForTargetedAccount(MainActivity.currentInstance, MainActivity.currentUserID, id); } } catch (Exception e) { @@ -744,7 +741,7 @@ public class AccountsVM extends AndroidViewModel { Response muteResponse = muteCall.execute(); if (muteResponse.isSuccessful()) { relationShip = muteResponse.body(); - sendAction(getApplication().getApplicationContext(), Helper.ARG_DELETE_ALL_FOR_ACCOUNT_ID, null, id); + StatusAdapter.sendAction(getApplication().getApplicationContext(), Helper.ARG_DELETE_ALL_FOR_ACCOUNT_ID, null, id); new StatusCache(getApplication().getApplicationContext()).deleteStatusForTargetedAccount(MainActivity.currentInstance, MainActivity.currentUserID, id); } } catch (Exception e) { @@ -819,12 +816,12 @@ public class AccountsVM extends AndroidViewModel { new Thread(() -> { try { new MutedAccounts(getApplication().getApplicationContext()).muteAccount(forAccount, target); - addMutedAccount(target); + Helper.addMutedAccount(target); } catch (DBException e) { e.printStackTrace(); } Handler mainHandler = new Handler(Looper.getMainLooper()); - sendAction(getApplication().getApplicationContext(), Helper.ARG_STATUS_ACCOUNT_ID_DELETED, null, target.id); + StatusAdapter.sendAction(getApplication().getApplicationContext(), Helper.ARG_STATUS_ACCOUNT_ID_DELETED, null, target.id); Runnable myRunnable = () -> accountMutableLiveData.setValue(target); mainHandler.post(myRunnable); }).start(); @@ -843,8 +840,8 @@ public class AccountsVM extends AndroidViewModel { try { for (Account target : targets) { new MutedAccounts(getApplication().getApplicationContext()).muteAccount(forAccount, target); - sendAction(getApplication().getApplicationContext(), Helper.ARG_STATUS_ACCOUNT_ID_DELETED, null, target.id); - addMutedAccount(target); + StatusAdapter.sendAction(getApplication().getApplicationContext(), Helper.ARG_STATUS_ACCOUNT_ID_DELETED, null, target.id); + Helper.addMutedAccount(target); } } catch (DBException e) { e.printStackTrace(); @@ -867,7 +864,7 @@ public class AccountsVM extends AndroidViewModel { new Thread(() -> { try { new MutedAccounts(getApplication().getApplicationContext()).unMuteAccount(forAccount, target); - removeMutedAccount(target); + Helper.removeMutedAccount(target); } catch (DBException e) { e.printStackTrace(); } diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AdminVM.java similarity index 98% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AdminVM.java index 3d58ae0c..5db5eed1 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AdminVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AdminVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -26,15 +26,15 @@ import androidx.lifecycle.MutableLiveData; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonAdminService; -import app.fedilab.android.client.entities.api.admin.AdminAccount; -import app.fedilab.android.client.entities.api.admin.AdminAccounts; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlock; -import app.fedilab.android.client.entities.api.admin.AdminDomainBlocks; -import app.fedilab.android.client.entities.api.admin.AdminReport; -import app.fedilab.android.client.entities.api.admin.AdminReports; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.endpoints.MastodonAdminService; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccount; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminAccounts; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlock; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminDomainBlocks; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReport; +import app.fedilab.android.mastodon.client.entities.api.admin.AdminReports; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AnnouncementsVM.java similarity index 96% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AnnouncementsVM.java index 06eccbfd..3412b3c7 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AnnouncementsVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AnnouncementsVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -26,9 +26,9 @@ import androidx.lifecycle.MutableLiveData; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonAnnouncementsService; -import app.fedilab.android.client.entities.api.Announcement; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonAnnouncementsService; +import app.fedilab.android.mastodon.client.entities.api.Announcement; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AppsVM.java similarity index 95% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AppsVM.java index 7a77d610..9fc4ba2a 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/AppsVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/AppsVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import com.google.gson.GsonBuilder; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonAppsService; -import app.fedilab.android.client.entities.api.App; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonAppsService; +import app.fedilab.android.mastodon.client.entities.api.App; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/FiltersVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/FiltersVM.java similarity index 97% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/FiltersVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/FiltersVM.java index ca73a5e8..f69ae079 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/FiltersVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/FiltersVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; -import app.fedilab.android.client.endpoints.MastodonFiltersService; -import app.fedilab.android.client.entities.api.Filter; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonFiltersService; +import app.fedilab.android.mastodon.client.entities.api.Filter; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstanceSocialVM.java similarity index 93% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstanceSocialVM.java index 1fac3f55..65ec705c 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstanceSocialVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstanceSocialVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -25,9 +25,9 @@ import androidx.lifecycle.MutableLiveData; import java.util.ArrayList; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.entities.app.InstanceSocial; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.interfaces.InstancesSocialService; +import app.fedilab.android.mastodon.client.entities.app.InstanceSocial; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.interfaces.InstancesSocialService; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstancesVM.java similarity index 92% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstancesVM.java index 5857ce84..894fa616 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/InstancesVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/InstancesVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -31,13 +31,13 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.BaseMainActivity; -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 app.fedilab.android.mastodon.client.endpoints.MastodonInstanceService; +import app.fedilab.android.mastodon.client.entities.api.Emoji; +import app.fedilab.android.mastodon.client.entities.api.EmojiInstance; +import app.fedilab.android.mastodon.client.entities.api.Instance; +import app.fedilab.android.mastodon.client.entities.api.InstanceInfo; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/JoinInstancesVM.java similarity index 93% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/JoinInstancesVM.java index 2909572c..2fd5c0ac 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/JoinInstancesVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/JoinInstancesVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -26,9 +26,9 @@ import androidx.lifecycle.MutableLiveData; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.JoinMastodonService; -import app.fedilab.android.client.entities.api.JoinMastodonInstance; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.JoinMastodonService; +import app.fedilab.android.mastodon.client.entities.api.JoinMastodonInstance; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NodeInfoVM.java similarity index 94% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NodeInfoVM.java index ebd12e2a..06a219ad 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NodeInfoVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NodeInfoVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -26,9 +26,9 @@ import androidx.lifecycle.MutableLiveData; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.NodeInfoService; -import app.fedilab.android.client.entities.app.WellKnownNodeinfo; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.NodeInfoService; +import app.fedilab.android.mastodon.client.entities.app.WellKnownNodeinfo; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NotificationsVM.java similarity index 96% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NotificationsVM.java index 02e63b43..c7b24c8e 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/NotificationsVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,18 +28,18 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; -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.Pagination; -import app.fedilab.android.client.entities.api.PushSubscription; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.TimelineHelper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.client.endpoints.MastodonNotificationsService; +import app.fedilab.android.mastodon.client.entities.api.Notification; +import app.fedilab.android.mastodon.client.entities.api.Notifications; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.PushSubscription; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.TimelineHelper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OauthVM.java similarity index 95% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OauthVM.java index 37cba72d..7ecdb407 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OauthVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OauthVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -28,9 +28,9 @@ import com.google.gson.GsonBuilder; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonAppsService; -import app.fedilab.android.client.entities.api.Token; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonAppsService; +import app.fedilab.android.mastodon.client.entities.api.Token; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OembedVM.java similarity index 90% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OembedVM.java index f1159a65..2200fc00 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/OembedVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/OembedVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -21,8 +21,8 @@ import androidx.lifecycle.AndroidViewModel; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonOembedService; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonOembedService; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/ReorderVM.java similarity index 94% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/ReorderVM.java index 49854552..242fbcd5 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/ReorderVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -32,14 +32,14 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -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.client.entities.app.PinnedTimeline; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.MastodonSearchService; +import app.fedilab.android.mastodon.client.entities.api.Results; +import app.fedilab.android.mastodon.client.entities.app.BottomMenu; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.client.entities.app.PinnedTimeline; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/SearchVM.java similarity index 93% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/SearchVM.java index 5e259a50..47a291db 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/SearchVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/SearchVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -30,12 +30,12 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -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.mastodon.client.endpoints.MastodonSearchService; +import app.fedilab.android.mastodon.client.entities.api.Results; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/StatusesVM.java similarity index 97% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/StatusesVM.java index bb9c88cf..4c207439 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/StatusesVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -30,25 +30,25 @@ import java.util.List; import java.util.concurrent.TimeUnit; import app.fedilab.android.R; -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.api.StatusSource; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.TimelineHelper; +import app.fedilab.android.mastodon.client.endpoints.MastodonStatusesService; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Accounts; +import app.fedilab.android.mastodon.client.entities.api.Attachment; +import app.fedilab.android.mastodon.client.entities.api.Card; +import app.fedilab.android.mastodon.client.entities.api.Context; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Poll; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.api.ScheduledStatuses; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.StatusSource; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.TimelineHelper; import okhttp3.Headers; import okhttp3.MediaType; import okhttp3.MultipartBody; @@ -398,7 +398,7 @@ public class StatusesVM extends AndroidViewModel { } //The status must also be deleted in cache try { - BaseAccount account = new app.fedilab.android.client.entities.app.Account(getApplication().getApplicationContext()).getAccountByToken(token); + BaseAccount account = new app.fedilab.android.mastodon.client.entities.app.Account(getApplication().getApplicationContext()).getAccountByToken(token); new StatusCache(getApplication().getApplicationContext()).deleteStatus(account.instance, id); } catch (DBException e) { e.printStackTrace(); diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TagVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TagVM.java similarity index 94% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/TagVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TagVM.java index b2d8b7e8..75f1763e 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TagVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TagVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -26,12 +26,12 @@ import androidx.lifecycle.MutableLiveData; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.MastodonTagService; -import app.fedilab.android.client.entities.api.Pagination; -import app.fedilab.android.client.entities.api.Tag; -import app.fedilab.android.client.entities.api.Tags; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; +import app.fedilab.android.mastodon.client.endpoints.MastodonTagService; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.api.Tags; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TimelinesVM.java similarity index 96% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TimelinesVM.java index e1e29342..5361311d 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TimelinesVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TimelinesVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -35,28 +35,28 @@ import java.util.concurrent.TimeUnit; import app.fedilab.android.R; import app.fedilab.android.activities.MainActivity; -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.api.Tag; -import app.fedilab.android.client.entities.app.BaseAccount; -import app.fedilab.android.client.entities.app.StatusCache; -import app.fedilab.android.client.entities.app.StatusDraft; -import app.fedilab.android.client.entities.app.Timeline; -import app.fedilab.android.client.entities.misskey.MisskeyNote; -import app.fedilab.android.client.entities.nitter.Nitter; -import app.fedilab.android.client.entities.peertube.PeertubeVideo; -import app.fedilab.android.exception.DBException; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.helper.MastodonHelper; -import app.fedilab.android.helper.TimelineHelper; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.client.endpoints.MastodonTimelinesService; +import app.fedilab.android.mastodon.client.entities.api.Account; +import app.fedilab.android.mastodon.client.entities.api.Conversation; +import app.fedilab.android.mastodon.client.entities.api.Conversations; +import app.fedilab.android.mastodon.client.entities.api.Marker; +import app.fedilab.android.mastodon.client.entities.api.MastodonList; +import app.fedilab.android.mastodon.client.entities.api.Pagination; +import app.fedilab.android.mastodon.client.entities.api.Status; +import app.fedilab.android.mastodon.client.entities.api.Statuses; +import app.fedilab.android.mastodon.client.entities.api.Tag; +import app.fedilab.android.mastodon.client.entities.app.BaseAccount; +import app.fedilab.android.mastodon.client.entities.app.StatusCache; +import app.fedilab.android.mastodon.client.entities.app.StatusDraft; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.client.entities.misskey.MisskeyNote; +import app.fedilab.android.mastodon.client.entities.nitter.Nitter; +import app.fedilab.android.mastodon.client.entities.peertube.PeertubeVideo; +import app.fedilab.android.mastodon.exception.DBException; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.TimelineHelper; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TopBarVM.java similarity index 91% rename from app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TopBarVM.java index fc8fd4dc..2256e23a 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/TopBarVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/mastodon/TopBarVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.mastodon; +package app.fedilab.android.mastodon.viewmodel.mastodon; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -25,8 +25,8 @@ import androidx.lifecycle.AndroidViewModel; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; -import app.fedilab.android.client.entities.app.Pinned; -import app.fedilab.android.exception.DBException; +import app.fedilab.android.mastodon.client.entities.app.Pinned; +import app.fedilab.android.mastodon.exception.DBException; public class TopBarVM extends AndroidViewModel { diff --git a/app/src/main/java/app/fedilab/android/viewmodel/pleroma/ActionsVM.java b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/pleroma/ActionsVM.java similarity index 93% rename from app/src/main/java/app/fedilab/android/viewmodel/pleroma/ActionsVM.java rename to app/src/main/java/app/fedilab/android/mastodon/viewmodel/pleroma/ActionsVM.java index c57b52ea..0cd875de 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/pleroma/ActionsVM.java +++ b/app/src/main/java/app/fedilab/android/mastodon/viewmodel/pleroma/ActionsVM.java @@ -1,4 +1,4 @@ -package app.fedilab.android.viewmodel.pleroma; +package app.fedilab.android.mastodon.viewmodel.pleroma; /* Copyright 2022 Thomas Schneider * * This file is a part of Fedilab @@ -23,9 +23,9 @@ import androidx.lifecycle.MutableLiveData; import java.util.List; import java.util.concurrent.TimeUnit; -import app.fedilab.android.client.endpoints.PleromaAPI; -import app.fedilab.android.client.entities.api.Announcement; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.client.endpoints.PleromaAPI; +import app.fedilab.android.mastodon.client.entities.api.Announcement; +import app.fedilab.android.mastodon.helper.Helper; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Retrofit; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/Watermark.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/Watermark.java similarity index 90% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/Watermark.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/Watermark.java index 094ae984..bc47dfad 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/Watermark.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/Watermark.java @@ -14,10 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.resizeBitmap; -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.textAsBitmap; +package app.fedilab.android.mastodon.watermark.androidwm; import android.content.Context; import android.graphics.Bitmap; @@ -34,13 +31,13 @@ import androidx.annotation.Nullable; import java.util.List; -import app.fedilab.android.watermark.androidwm.bean.AsyncTaskParams; -import app.fedilab.android.watermark.androidwm.bean.WatermarkImage; -import app.fedilab.android.watermark.androidwm.bean.WatermarkText; -import app.fedilab.android.watermark.androidwm.listener.BuildFinishListener; -import app.fedilab.android.watermark.androidwm.task.FDWatermarkTask; -import app.fedilab.android.watermark.androidwm.task.LSBWatermarkTask; -import app.fedilab.android.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.bean.AsyncTaskParams; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkImage; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkText; +import app.fedilab.android.mastodon.watermark.androidwm.listener.BuildFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.task.FDWatermarkTask; +import app.fedilab.android.mastodon.watermark.androidwm.task.LSBWatermarkTask; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; /** * The main class for watermark processing library. @@ -118,7 +115,7 @@ public class Watermark { private void createWatermarkImage(WatermarkImage watermarkImg) { if (watermarkImg != null && backgroundImg != null) { if (isInvisible) { - Bitmap scaledWMBitmap = resizeBitmap(watermarkImg.getImage(), (float) watermarkImg.getSize(), backgroundImg); + Bitmap scaledWMBitmap = BitmapUtils.resizeBitmap(watermarkImg.getImage(), (float) watermarkImg.getSize(), backgroundImg); if (isLSB) { new LSBWatermarkTask(buildFinishListener).execute( new AsyncTaskParams(context, backgroundImg, scaledWMBitmap) @@ -135,7 +132,7 @@ public class Watermark { backgroundImg.getHeight(), backgroundImg.getConfig()); Canvas watermarkCanvas = new Canvas(newBitmap); watermarkCanvas.drawBitmap(canvasBitmap, 0, 0, null); - Bitmap scaledWMBitmap = resizeBitmap(watermarkImg.getImage(), (float) watermarkImg.getSize(), backgroundImg); + Bitmap scaledWMBitmap = BitmapUtils.resizeBitmap(watermarkImg.getImage(), (float) watermarkImg.getSize(), backgroundImg); scaledWMBitmap = adjustPhotoRotation(scaledWMBitmap, (int) watermarkImg.getPosition().getRotation()); @@ -196,7 +193,7 @@ public class Watermark { backgroundImg.getHeight(), backgroundImg.getConfig()); Canvas watermarkCanvas = new Canvas(newBitmap); watermarkCanvas.drawBitmap(canvasBitmap, 0, 0, null); - Bitmap scaledWMBitmap = textAsBitmap(context, watermarkText); + Bitmap scaledWMBitmap = BitmapUtils.textAsBitmap(context, watermarkText); scaledWMBitmap = adjustPhotoRotation(scaledWMBitmap, (int) watermarkText.getPosition().getRotation()); diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkBuilder.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkBuilder.java similarity index 92% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkBuilder.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkBuilder.java index 0b054092..a5264017 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkBuilder.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkBuilder.java @@ -14,10 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.resizeBitmap; -import static app.fedilab.android.watermark.androidwm.utils.Constant.MAX_IMAGE_SIZE; +package app.fedilab.android.mastodon.watermark.androidwm; import android.content.Context; import android.graphics.Bitmap; @@ -31,10 +28,12 @@ import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; -import app.fedilab.android.watermark.androidwm.bean.WatermarkImage; -import app.fedilab.android.watermark.androidwm.bean.WatermarkPosition; -import app.fedilab.android.watermark.androidwm.bean.WatermarkText; -import app.fedilab.android.watermark.androidwm.listener.BuildFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkImage; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkPosition; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkText; +import app.fedilab.android.mastodon.watermark.androidwm.listener.BuildFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.utils.Constant; /** * A builder class for setting default structural classes for watermark to use. @@ -61,7 +60,7 @@ public final class WatermarkBuilder { this.context = context; this.resizeBackgroundImg = resizeBackgroundImg; if (resizeBackgroundImg) { - this.backgroundImg = resizeBitmap(backgroundImg, MAX_IMAGE_SIZE); + this.backgroundImg = BitmapUtils.resizeBitmap(backgroundImg, Constant.MAX_IMAGE_SIZE); } else { this.backgroundImg = backgroundImg; } @@ -77,8 +76,8 @@ public final class WatermarkBuilder { this.context = context; this.resizeBackgroundImg = resizeBackgroundImg; if (resizeBackgroundImg) { - this.backgroundImg = resizeBitmap(BitmapFactory.decodeResource(context.getResources(), - backgroundDrawable), MAX_IMAGE_SIZE); + this.backgroundImg = BitmapUtils.resizeBitmap(BitmapFactory.decodeResource(context.getResources(), + backgroundDrawable), Constant.MAX_IMAGE_SIZE); } else { this.backgroundImg = BitmapFactory.decodeResource(context.getResources(), backgroundDrawable); @@ -315,7 +314,7 @@ public final class WatermarkBuilder { if (imageView.getDrawable() != null) { BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable(); if (resizeBackgroundImg) { - backgroundImg = resizeBitmap(drawable.getBitmap(), MAX_IMAGE_SIZE); + backgroundImg = BitmapUtils.resizeBitmap(drawable.getBitmap(), Constant.MAX_IMAGE_SIZE); } else { backgroundImg = drawable.getBitmap(); } diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkDetector.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkDetector.java similarity index 88% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkDetector.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkDetector.java index ad6a171c..4d507e9e 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/WatermarkDetector.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/WatermarkDetector.java @@ -14,15 +14,15 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm; +package app.fedilab.android.mastodon.watermark.androidwm; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.widget.ImageView; -import app.fedilab.android.watermark.androidwm.listener.DetectFinishListener; -import app.fedilab.android.watermark.androidwm.task.FDDetectionTask; -import app.fedilab.android.watermark.androidwm.task.LSBDetectionTask; +import app.fedilab.android.mastodon.watermark.androidwm.listener.DetectFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.task.FDDetectionTask; +import app.fedilab.android.mastodon.watermark.androidwm.task.LSBDetectionTask; import io.reactivex.annotations.NonNull; /** diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/AsyncTaskParams.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/AsyncTaskParams.java similarity index 97% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/bean/AsyncTaskParams.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/AsyncTaskParams.java index b1f0fed8..3d406789 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/AsyncTaskParams.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/AsyncTaskParams.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.bean; +package app.fedilab.android.mastodon.watermark.androidwm.bean; import android.content.Context; import android.graphics.Bitmap; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkImage.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkImage.java similarity index 87% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkImage.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkImage.java index a6b7c4b3..93bbe46e 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkImage.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkImage.java @@ -14,10 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.bean; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.resizeBitmap; -import static app.fedilab.android.watermark.androidwm.utils.Constant.MAX_IMAGE_SIZE; +package app.fedilab.android.mastodon.watermark.androidwm.bean; import android.content.Context; import android.graphics.Bitmap; @@ -28,6 +25,9 @@ import android.widget.ImageView; import androidx.annotation.DrawableRes; import androidx.annotation.FloatRange; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.utils.Constant; + /** * It's a wrapper of the watermark image. * @@ -50,7 +50,7 @@ public class WatermarkImage { * we set the maxsize of an image to 1024x1024. */ public WatermarkImage(Bitmap image) { - this.image = resizeBitmap(image, MAX_IMAGE_SIZE); + this.image = BitmapUtils.resizeBitmap(image, Constant.MAX_IMAGE_SIZE); } public WatermarkImage(Context context, @DrawableRes int imageDrawable, WatermarkPosition position) { @@ -67,7 +67,7 @@ public class WatermarkImage { } public WatermarkImage(Bitmap image, WatermarkPosition position) { - this.image = resizeBitmap(image, MAX_IMAGE_SIZE); + this.image = BitmapUtils.resizeBitmap(image, Constant.MAX_IMAGE_SIZE); this.position = position; } @@ -149,11 +149,11 @@ public class WatermarkImage { imageView.invalidate(); BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable(); // set the limitation of input bitmap. - this.image = resizeBitmap(drawable.getBitmap(), MAX_IMAGE_SIZE); + this.image = BitmapUtils.resizeBitmap(drawable.getBitmap(), Constant.MAX_IMAGE_SIZE); } private Bitmap getBitmapFromDrawable(@DrawableRes int imageDrawable) { - return resizeBitmap(BitmapFactory.decodeResource(context.getResources(), - imageDrawable), MAX_IMAGE_SIZE); + return BitmapUtils.resizeBitmap(BitmapFactory.decodeResource(context.getResources(), + imageDrawable), Constant.MAX_IMAGE_SIZE); } } diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkPosition.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkPosition.java similarity index 97% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkPosition.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkPosition.java index f114b7d7..7090f333 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkPosition.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkPosition.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.bean; +package app.fedilab.android.mastodon.watermark.androidwm.bean; import androidx.annotation.FloatRange; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkText.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkText.java similarity index 98% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkText.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkText.java index 4ac425ca..b85eac26 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/bean/WatermarkText.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/bean/WatermarkText.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.bean; +package app.fedilab.android.mastodon.watermark.androidwm.bean; import android.graphics.Color; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/listener/BuildFinishListener.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/BuildFinishListener.java similarity index 93% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/listener/BuildFinishListener.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/BuildFinishListener.java index 19eb3e33..8888356f 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/listener/BuildFinishListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/BuildFinishListener.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.listener; +package app.fedilab.android.mastodon.watermark.androidwm.listener; /** diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/listener/DetectFinishListener.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/DetectFinishListener.java similarity index 85% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/listener/DetectFinishListener.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/DetectFinishListener.java index c516056e..e952d61f 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/listener/DetectFinishListener.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/listener/DetectFinishListener.java @@ -14,10 +14,10 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.listener; +package app.fedilab.android.mastodon.watermark.androidwm.listener; -import app.fedilab.android.watermark.androidwm.task.DetectionReturnValue; +import app.fedilab.android.mastodon.watermark.androidwm.task.DetectionReturnValue; /** * This interface is for listening if the task of diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/DetectionReturnValue.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/DetectionReturnValue.java similarity index 96% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/task/DetectionReturnValue.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/DetectionReturnValue.java index 712e7549..71a0497a 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/DetectionReturnValue.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/DetectionReturnValue.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.task; +package app.fedilab.android.mastodon.watermark.androidwm.task; import android.graphics.Bitmap; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/FDDetectionTask.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/FDDetectionTask.java similarity index 66% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/task/FDDetectionTask.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/FDDetectionTask.java index 050433c7..9796543c 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/FDDetectionTask.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/FDDetectionTask.java @@ -14,22 +14,16 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.task; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.getBitmapPixels; -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.pixel2ARGBArray; -import static app.fedilab.android.watermark.androidwm.utils.Constant.CHUNK_SIZE; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_BITMAP_NULL; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_DETECT_FAILED; -import static app.fedilab.android.watermark.androidwm.utils.Constant.MAX_IMAGE_SIZE; -import static app.fedilab.android.watermark.androidwm.utils.Constant.WARNING_BIG_IMAGE; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.copyFromIntArray; +package app.fedilab.android.mastodon.watermark.androidwm.task; import android.graphics.Bitmap; import android.os.AsyncTask; -import app.fedilab.android.watermark.androidwm.listener.DetectFinishListener; -import app.fedilab.android.watermark.androidwm.utils.FastDctFft; +import app.fedilab.android.mastodon.watermark.androidwm.listener.DetectFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.utils.Constant; +import app.fedilab.android.mastodon.watermark.androidwm.utils.FastDctFft; +import app.fedilab.android.mastodon.watermark.androidwm.utils.StringUtils; /** * This is a task for watermark image detection. @@ -52,34 +46,34 @@ public class FDDetectionTask extends AsyncTask MAX_IMAGE_SIZE || markedBitmap.getHeight() > MAX_IMAGE_SIZE) { - listener.onFailure(WARNING_BIG_IMAGE); + if (markedBitmap.getWidth() > Constant.MAX_IMAGE_SIZE || markedBitmap.getHeight() > Constant.MAX_IMAGE_SIZE) { + listener.onFailure(Constant.WARNING_BIG_IMAGE); return null; } - int[] pixels = getBitmapPixels(markedBitmap); + int[] pixels = BitmapUtils.getBitmapPixels(markedBitmap); // divide and conquer - if (pixels.length < CHUNK_SIZE) { - int[] watermarkRGB = pixel2ARGBArray(pixels); - double[] watermarkArray = copyFromIntArray(watermarkRGB); + if (pixels.length < Constant.CHUNK_SIZE) { + int[] watermarkRGB = BitmapUtils.pixel2ARGBArray(pixels); + double[] watermarkArray = StringUtils.copyFromIntArray(watermarkRGB); FastDctFft.transform(watermarkArray); //TODO: do some operations with colorTempArray. } else { - int numOfChunks = (int) Math.ceil((double) pixels.length / CHUNK_SIZE); + int numOfChunks = (int) Math.ceil((double) pixels.length / Constant.CHUNK_SIZE); for (int i = 0; i < numOfChunks; i++) { - int start = i * CHUNK_SIZE; - int length = Math.min(pixels.length - start, CHUNK_SIZE); + int start = i * Constant.CHUNK_SIZE; + int length = Math.min(pixels.length - start, Constant.CHUNK_SIZE); int[] temp = new int[length]; System.arraycopy(pixels, start, temp, 0, length); - double[] colorTempArray = copyFromIntArray(pixel2ARGBArray(temp)); + double[] colorTempArray = StringUtils.copyFromIntArray(BitmapUtils.pixel2ARGBArray(temp)); FastDctFft.transform(colorTempArray); //TODO: do some operations with colorTempArray. @@ -106,7 +100,7 @@ public class FDDetectionTask extends AsyncTask { Context context = params[0].getContext(); if (backgroundBitmap == null) { - listener.onFailure(ERROR_NO_BACKGROUND); + listener.onFailure(Constant.ERROR_NO_BACKGROUND); return null; } if (watermarkText != null) { - watermarkBitmap = textAsBitmap(context, watermarkText); + watermarkBitmap = BitmapUtils.textAsBitmap(context, watermarkText); } if (watermarkBitmap == null) { - listener.onFailure(ERROR_NO_WATERMARKS); + listener.onFailure(Constant.ERROR_NO_WATERMARKS); return null; } - int[] watermarkPixels = getBitmapPixels(watermarkBitmap); - int[] watermarkColorArray = pixel2ARGBArray(watermarkPixels); + int[] watermarkPixels = BitmapUtils.getBitmapPixels(watermarkBitmap); + int[] watermarkColorArray = BitmapUtils.pixel2ARGBArray(watermarkPixels); Bitmap outputBitmap = Bitmap.createBitmap(backgroundBitmap.getWidth(), backgroundBitmap.getHeight(), backgroundBitmap.getConfig()); // convert the background bitmap into pixel array. - int[] backgroundPixels = getBitmapPixels(backgroundBitmap); + int[] backgroundPixels = BitmapUtils.getBitmapPixels(backgroundBitmap); if (watermarkColorArray.length > backgroundPixels.length * 4) { - listener.onFailure(ERROR_PIXELS_NOT_ENOUGH); + listener.onFailure(Constant.ERROR_PIXELS_NOT_ENOUGH); } else { // divide and conquer // use fixed chunk size or the size of watermark image. if (backgroundPixels.length < watermarkColorArray.length) { - int[] backgroundColorArray = pixel2ARGBArray(backgroundPixels); - double[] backgroundColorArrayD = copyFromIntArray(backgroundColorArray); + int[] backgroundColorArray = BitmapUtils.pixel2ARGBArray(backgroundPixels); + double[] backgroundColorArrayD = StringUtils.copyFromIntArray(backgroundColorArray); FastDctFft.transform(backgroundColorArrayD); @@ -111,7 +105,7 @@ public class FDWatermarkTask extends AsyncTask { int length = Math.min(backgroundPixels.length - start, watermarkColorArray.length); int[] temp = new int[length]; System.arraycopy(backgroundPixels, start, temp, 0, length); - double[] colorTempD = copyFromIntArray(pixel2ARGBArray(temp)); + double[] colorTempD = StringUtils.copyFromIntArray(BitmapUtils.pixel2ARGBArray(temp)); FastDctFft.transform(colorTempD); // for (int j = 0; j < length; j++) { @@ -163,7 +157,7 @@ public class FDWatermarkTask extends AsyncTask { if (bitmap != null) { listener.onSuccess(bitmap); } else { - listener.onFailure(ERROR_CREATE_FAILED); + listener.onFailure(Constant.ERROR_CREATE_FAILED); } } super.onPostExecute(bitmap); diff --git a/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBDetectionTask.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBDetectionTask.java new file mode 100644 index 00000000..06f24a49 --- /dev/null +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBDetectionTask.java @@ -0,0 +1,97 @@ +/* + * Copyright 2018 Yizheng Huang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package app.fedilab.android.mastodon.watermark.androidwm.task; + +import android.graphics.Bitmap; +import android.os.AsyncTask; + +import app.fedilab.android.mastodon.watermark.androidwm.listener.DetectFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.utils.Constant; +import app.fedilab.android.mastodon.watermark.androidwm.utils.StringUtils; + +/** + * This is a task for watermark image detection. + * In LSB mode, all the task will return a bitmap; + * + * @author huangyz0918 (huangyz0918@gmail.com) + */ +public class LSBDetectionTask extends AsyncTask { + + private final DetectFinishListener listener; + + public LSBDetectionTask(DetectFinishListener listener) { + this.listener = listener; + } + + @Override + protected DetectionReturnValue doInBackground(Bitmap... bitmaps) { + Bitmap markedBitmap = bitmaps[0]; + DetectionReturnValue resultValue = new DetectionReturnValue(); + + if (markedBitmap == null) { + listener.onFailure(Constant.ERROR_BITMAP_NULL); + return null; + } + + if (markedBitmap.getWidth() > Constant.MAX_IMAGE_SIZE || markedBitmap.getHeight() > Constant.MAX_IMAGE_SIZE) { + listener.onFailure(Constant.WARNING_BIG_IMAGE); + return null; + } + + int[] pixels = BitmapUtils.getBitmapPixels(markedBitmap); + int[] colorArray = BitmapUtils.pixel2ARGBArray(pixels); + + for (int i = 0; i < colorArray.length; i++) { + colorArray[i] = colorArray[i] % 10; + } + + StringUtils.replaceNinesJ(colorArray); + String binaryString = StringUtils.intArrayToStringJ(colorArray); + String resultString; + + if (binaryString.contains(Constant.LSB_TEXT_PREFIX_FLAG) && binaryString.contains(Constant.LSB_TEXT_SUFFIX_FLAG)) { + resultString = StringUtils.getBetweenStrings(binaryString, true, listener); + resultString = StringUtils.binaryToString(resultString); + resultValue.setWatermarkString(resultString); + } else if (binaryString.contains(Constant.LSB_IMG_PREFIX_FLAG) && binaryString.contains(Constant.LSB_IMG_SUFFIX_FLAG)) { + binaryString = StringUtils.getBetweenStrings(binaryString, false, listener); + resultString = StringUtils.binaryToString(binaryString); + resultValue.setWatermarkBitmap(BitmapUtils.stringToBitmap(resultString)); + } + + return resultValue; + } + + @Override + protected void onPostExecute(DetectionReturnValue detectionReturnValue) { + if (detectionReturnValue == null) { + listener.onFailure(Constant.ERROR_DETECT_FAILED); + return; + } + + if (detectionReturnValue.getWatermarkString() != null && + !"".equals(detectionReturnValue.getWatermarkString()) || + detectionReturnValue.getWatermarkBitmap() != null) { + listener.onSuccess(detectionReturnValue); + } else { + listener.onFailure(Constant.ERROR_DETECT_FAILED); + } + super.onPostExecute(detectionReturnValue); + } + +} diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBWatermarkTask.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBWatermarkTask.java similarity index 62% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBWatermarkTask.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBWatermarkTask.java index 8cfe35b1..f844fa0f 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBWatermarkTask.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/task/LSBWatermarkTask.java @@ -14,30 +14,18 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.task; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.getBitmapPixels; -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.pixel2ARGBArray; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_CREATE_FAILED; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_NO_BACKGROUND; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_NO_WATERMARKS; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_PIXELS_NOT_ENOUGH; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_SUFFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_SUFFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.replaceSingleDigit; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.stringToBinary; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.stringToIntArray; +package app.fedilab.android.mastodon.watermark.androidwm.task; import android.graphics.Bitmap; import android.graphics.Color; import android.os.AsyncTask; -import app.fedilab.android.watermark.androidwm.bean.AsyncTaskParams; -import app.fedilab.android.watermark.androidwm.bean.WatermarkText; -import app.fedilab.android.watermark.androidwm.listener.BuildFinishListener; -import app.fedilab.android.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.bean.AsyncTaskParams; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkText; +import app.fedilab.android.mastodon.watermark.androidwm.listener.BuildFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.utils.BitmapUtils; +import app.fedilab.android.mastodon.watermark.androidwm.utils.Constant; +import app.fedilab.android.mastodon.watermark.androidwm.utils.StringUtils; /** * This is a background task for adding the specific invisible text @@ -63,7 +51,7 @@ public class LSBWatermarkTask extends AsyncTask { String watermarkString; if (backgroundBitmap == null) { - listener.onFailure(ERROR_NO_BACKGROUND); + listener.onFailure(Constant.ERROR_NO_BACKGROUND); return null; } @@ -75,36 +63,36 @@ public class LSBWatermarkTask extends AsyncTask { } if (watermarkString == null) { - listener.onFailure(ERROR_NO_WATERMARKS); + listener.onFailure(Constant.ERROR_NO_WATERMARKS); return null; } Bitmap outputBitmap = Bitmap.createBitmap(backgroundBitmap.getWidth(), backgroundBitmap.getHeight(), backgroundBitmap.getConfig()); - int[] backgroundPixels = getBitmapPixels(backgroundBitmap); - int[] backgroundColorArray = pixel2ARGBArray(backgroundPixels); + int[] backgroundPixels = BitmapUtils.getBitmapPixels(backgroundBitmap); + int[] backgroundColorArray = BitmapUtils.pixel2ARGBArray(backgroundPixels); // convert the Sting into a binary string, and, replace the single digit number. // using the rebuilt pixels to create a new watermarked image. - String watermarkBinary = stringToBinary(watermarkString); + String watermarkBinary = StringUtils.stringToBinary(watermarkString); if (watermarkBitmap != null) { - watermarkBinary = LSB_IMG_PREFIX_FLAG + watermarkBinary + LSB_IMG_SUFFIX_FLAG; + watermarkBinary = Constant.LSB_IMG_PREFIX_FLAG + watermarkBinary + Constant.LSB_IMG_SUFFIX_FLAG; } else { - watermarkBinary = LSB_TEXT_PREFIX_FLAG + watermarkBinary + LSB_TEXT_SUFFIX_FLAG; + watermarkBinary = Constant.LSB_TEXT_PREFIX_FLAG + watermarkBinary + Constant.LSB_TEXT_SUFFIX_FLAG; } - int[] watermarkColorArray = stringToIntArray(watermarkBinary); + int[] watermarkColorArray = StringUtils.stringToIntArray(watermarkBinary); if (watermarkColorArray.length > backgroundColorArray.length) { - listener.onFailure(ERROR_PIXELS_NOT_ENOUGH); + listener.onFailure(Constant.ERROR_PIXELS_NOT_ENOUGH); } else { int chunkSize = watermarkColorArray.length; int numOfChunks = (int) Math.ceil((double) backgroundColorArray.length / chunkSize); for (int i = 0; i < numOfChunks - 1; i++) { int start = i * chunkSize; for (int j = 0; j < chunkSize; j++) { - backgroundColorArray[start + j] = replaceSingleDigit(backgroundColorArray[start + j] + backgroundColorArray[start + j] = StringUtils.replaceSingleDigit(backgroundColorArray[start + j] , watermarkColorArray[j]); } } @@ -134,7 +122,7 @@ public class LSBWatermarkTask extends AsyncTask { if (resultBitmap != null) { listener.onSuccess(resultBitmap); } else { - listener.onFailure(ERROR_CREATE_FAILED); + listener.onFailure(Constant.ERROR_CREATE_FAILED); } } super.onPostExecute(resultBitmap); diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/BitmapUtils.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/BitmapUtils.java similarity index 97% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/utils/BitmapUtils.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/BitmapUtils.java index 2c9c8f7d..1da75fbb 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/BitmapUtils.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/BitmapUtils.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.utils; +package app.fedilab.android.mastodon.watermark.androidwm.utils; import android.annotation.SuppressLint; import android.content.Context; @@ -41,8 +41,8 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; -import app.fedilab.android.watermark.androidwm.bean.WatermarkImage; -import app.fedilab.android.watermark.androidwm.bean.WatermarkText; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkImage; +import app.fedilab.android.mastodon.watermark.androidwm.bean.WatermarkText; /** * Util class for operations with {@link Bitmap}. diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Constant.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Constant.java similarity index 97% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Constant.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Constant.java index 84c7fc43..023488d5 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Constant.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Constant.java @@ -14,7 +14,7 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.utils; +package app.fedilab.android.mastodon.watermark.androidwm.utils; /** * the constant pool. diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/FastDctFft.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/FastDctFft.java similarity index 97% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/utils/FastDctFft.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/FastDctFft.java index 688d0001..869f1749 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/FastDctFft.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/FastDctFft.java @@ -15,7 +15,7 @@ * */ -package app.fedilab.android.watermark.androidwm.utils; +package app.fedilab.android.mastodon.watermark.androidwm.utils; import java.util.Arrays; diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Fft.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Fft.java similarity index 99% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Fft.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Fft.java index d3d3573a..115abf8a 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/Fft.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/Fft.java @@ -15,7 +15,7 @@ * */ -package app.fedilab.android.watermark.androidwm.utils; +package app.fedilab.android.mastodon.watermark.androidwm.utils; public final class Fft { diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/StringUtils.java b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/StringUtils.java similarity index 78% rename from app/src/main/java/app/fedilab/android/watermark/androidwm/utils/StringUtils.java rename to app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/StringUtils.java index 14efe352..e0ef4c2e 100644 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/utils/StringUtils.java +++ b/app/src/main/java/app/fedilab/android/mastodon/watermark/androidwm/utils/StringUtils.java @@ -14,16 +14,10 @@ * limitations under the License. * */ -package app.fedilab.android.watermark.androidwm.utils; +package app.fedilab.android.mastodon.watermark.androidwm.utils; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_NO_WATERMARK_FOUND; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_SUFFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_SUFFIX_FLAG; - -import app.fedilab.android.watermark.androidwm.listener.DetectFinishListener; +import app.fedilab.android.mastodon.watermark.androidwm.listener.DetectFinishListener; /** * Util class for operations with {@link String}. @@ -110,19 +104,19 @@ public class StringUtils { String result = null; if (isText) { try { - result = text.substring(text.indexOf(LSB_TEXT_PREFIX_FLAG) + LSB_TEXT_SUFFIX_FLAG.length() + result = text.substring(text.indexOf(Constant.LSB_TEXT_PREFIX_FLAG) + Constant.LSB_TEXT_SUFFIX_FLAG.length() ); - result = result.substring(0, result.indexOf(LSB_TEXT_SUFFIX_FLAG)); + result = result.substring(0, result.indexOf(Constant.LSB_TEXT_SUFFIX_FLAG)); } catch (StringIndexOutOfBoundsException e) { - listener.onFailure(ERROR_NO_WATERMARK_FOUND); + listener.onFailure(Constant.ERROR_NO_WATERMARK_FOUND); } } else { try { - result = text.substring(text.indexOf(LSB_IMG_PREFIX_FLAG) + LSB_IMG_SUFFIX_FLAG.length() + result = text.substring(text.indexOf(Constant.LSB_IMG_PREFIX_FLAG) + Constant.LSB_IMG_SUFFIX_FLAG.length() ); - result = result.substring(0, result.indexOf(LSB_IMG_SUFFIX_FLAG)); + result = result.substring(0, result.indexOf(Constant.LSB_IMG_SUFFIX_FLAG)); } catch (StringIndexOutOfBoundsException e) { - listener.onFailure(ERROR_NO_WATERMARK_FOUND); + listener.onFailure(Constant.ERROR_NO_WATERMARK_FOUND); } } diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginJoin.java b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java similarity index 94% rename from app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginJoin.java rename to app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java index 4da03f99..fcbb855b 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginJoin.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.login; +package app.fedilab.android.ui.fragment; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -23,7 +23,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import app.fedilab.android.databinding.FragmentLoginJoinBinding; -import app.fedilab.android.helper.Helper; +import app.fedilab.android.mastodon.helper.Helper; public class FragmentLoginJoin extends Fragment { 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/FragmentLoginMain.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java rename to app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java index 6840be3a..1dc6b014 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.login; +package app.fedilab.android.ui.fragment; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -54,16 +54,16 @@ import java.net.URLEncoder; import app.fedilab.android.BaseMainActivity; import app.fedilab.android.R; -import app.fedilab.android.activities.ProxyActivity; -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; -import app.fedilab.android.helper.ZipHelper; -import app.fedilab.android.viewmodel.mastodon.AppsVM; -import app.fedilab.android.viewmodel.mastodon.InstanceSocialVM; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.activities.ProxyActivity; +import app.fedilab.android.mastodon.client.entities.app.Account; +import app.fedilab.android.mastodon.client.entities.app.InstanceSocial; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.helper.MastodonHelper; +import app.fedilab.android.mastodon.helper.ZipHelper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AppsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.InstanceSocialVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; import es.dmoral.toasty.Toasty; public class FragmentLoginMain extends Fragment { 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/FragmentLoginPickInstanceMastodon.java similarity index 93% rename from app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java rename to app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginPickInstanceMastodon.java index d756ce24..87faac62 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginPickInstanceMastodon.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginPickInstanceMastodon.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.login; +package app.fedilab.android.ui.fragment; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -30,13 +30,13 @@ import androidx.recyclerview.widget.LinearLayoutManager; import java.util.List; import app.fedilab.android.R; -import app.fedilab.android.client.entities.api.JoinMastodonInstance; -import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.databinding.FragmentLoginPickInstanceMastodonBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.ui.drawer.InstanceRegAdapter; -import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; -import app.fedilab.android.viewmodel.mastodon.JoinInstancesVM; +import app.fedilab.android.mastodon.client.entities.api.JoinMastodonInstance; +import app.fedilab.android.mastodon.client.entities.app.Timeline; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.ui.drawer.InstanceRegAdapter; +import app.fedilab.android.mastodon.ui.fragment.timeline.FragmentMastodonTimeline; +import app.fedilab.android.mastodon.viewmodel.mastodon.JoinInstancesVM; public class FragmentLoginPickInstanceMastodon extends Fragment implements InstanceRegAdapter.ActionClick { diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginRegisterMastodon.java b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginRegisterMastodon.java similarity index 96% rename from app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginRegisterMastodon.java rename to app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginRegisterMastodon.java index a7163a90..fcf05adc 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginRegisterMastodon.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginRegisterMastodon.java @@ -1,4 +1,4 @@ -package app.fedilab.android.ui.fragment.login; +package app.fedilab.android.ui.fragment; /* Copyright 2021 Thomas Schneider * * This file is a part of Fedilab @@ -33,11 +33,11 @@ import java.util.Locale; import app.fedilab.android.R; import app.fedilab.android.databinding.FragmentLoginRegisterMastodonBinding; -import app.fedilab.android.helper.Helper; -import app.fedilab.android.viewmodel.mastodon.AccountsVM; -import app.fedilab.android.viewmodel.mastodon.AppsVM; -import app.fedilab.android.viewmodel.mastodon.NodeInfoVM; -import app.fedilab.android.viewmodel.mastodon.OauthVM; +import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.AppsVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.NodeInfoVM; +import app.fedilab.android.mastodon.viewmodel.mastodon.OauthVM; public class FragmentLoginRegisterMastodon extends Fragment { diff --git a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBDetectionTask.java b/app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBDetectionTask.java deleted file mode 100644 index bee0d03d..00000000 --- a/app/src/main/java/app/fedilab/android/watermark/androidwm/task/LSBDetectionTask.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2018 Yizheng Huang - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package app.fedilab.android.watermark.androidwm.task; - -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.getBitmapPixels; -import static app.fedilab.android.watermark.androidwm.utils.BitmapUtils.pixel2ARGBArray; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_BITMAP_NULL; -import static app.fedilab.android.watermark.androidwm.utils.Constant.ERROR_DETECT_FAILED; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_IMG_SUFFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_PREFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.LSB_TEXT_SUFFIX_FLAG; -import static app.fedilab.android.watermark.androidwm.utils.Constant.MAX_IMAGE_SIZE; -import static app.fedilab.android.watermark.androidwm.utils.Constant.WARNING_BIG_IMAGE; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.binaryToString; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.getBetweenStrings; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.intArrayToStringJ; -import static app.fedilab.android.watermark.androidwm.utils.StringUtils.replaceNinesJ; - -import android.graphics.Bitmap; -import android.os.AsyncTask; - -import app.fedilab.android.watermark.androidwm.listener.DetectFinishListener; -import app.fedilab.android.watermark.androidwm.utils.BitmapUtils; - -/** - * This is a task for watermark image detection. - * In LSB mode, all the task will return a bitmap; - * - * @author huangyz0918 (huangyz0918@gmail.com) - */ -public class LSBDetectionTask extends AsyncTask { - - private final DetectFinishListener listener; - - public LSBDetectionTask(DetectFinishListener listener) { - this.listener = listener; - } - - @Override - protected DetectionReturnValue doInBackground(Bitmap... bitmaps) { - Bitmap markedBitmap = bitmaps[0]; - DetectionReturnValue resultValue = new DetectionReturnValue(); - - if (markedBitmap == null) { - listener.onFailure(ERROR_BITMAP_NULL); - return null; - } - - if (markedBitmap.getWidth() > MAX_IMAGE_SIZE || markedBitmap.getHeight() > MAX_IMAGE_SIZE) { - listener.onFailure(WARNING_BIG_IMAGE); - return null; - } - - int[] pixels = getBitmapPixels(markedBitmap); - int[] colorArray = pixel2ARGBArray(pixels); - - for (int i = 0; i < colorArray.length; i++) { - colorArray[i] = colorArray[i] % 10; - } - - replaceNinesJ(colorArray); - String binaryString = intArrayToStringJ(colorArray); - String resultString; - - if (binaryString.contains(LSB_TEXT_PREFIX_FLAG) && binaryString.contains(LSB_TEXT_SUFFIX_FLAG)) { - resultString = getBetweenStrings(binaryString, true, listener); - resultString = binaryToString(resultString); - resultValue.setWatermarkString(resultString); - } else if (binaryString.contains(LSB_IMG_PREFIX_FLAG) && binaryString.contains(LSB_IMG_SUFFIX_FLAG)) { - binaryString = getBetweenStrings(binaryString, false, listener); - resultString = binaryToString(binaryString); - resultValue.setWatermarkBitmap(BitmapUtils.stringToBitmap(resultString)); - } - - return resultValue; - } - - @Override - protected void onPostExecute(DetectionReturnValue detectionReturnValue) { - if (detectionReturnValue == null) { - listener.onFailure(ERROR_DETECT_FAILED); - return; - } - - if (detectionReturnValue.getWatermarkString() != null && - !"".equals(detectionReturnValue.getWatermarkString()) || - detectionReturnValue.getWatermarkBitmap() != null) { - listener.onSuccess(detectionReturnValue); - } else { - listener.onFailure(ERROR_DETECT_FAILED); - } - super.onPostExecute(detectionReturnValue); - } - -} diff --git a/app/src/main/res/layout/account_field_item.xml b/app/src/main/res/layouts/mastodon/layout/account_field_item.xml similarity index 100% rename from app/src/main/res/layout/account_field_item.xml rename to app/src/main/res/layouts/mastodon/layout/account_field_item.xml diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layouts/mastodon/layout/activity_about.xml similarity index 100% rename from app/src/main/res/layout/activity_about.xml rename to app/src/main/res/layouts/mastodon/layout/activity_about.xml diff --git a/app/src/main/res/layout/activity_actions.xml b/app/src/main/res/layouts/mastodon/layout/activity_actions.xml similarity index 100% rename from app/src/main/res/layout/activity_actions.xml rename to app/src/main/res/layouts/mastodon/layout/activity_actions.xml diff --git a/app/src/main/res/layout/activity_admin_account.xml b/app/src/main/res/layouts/mastodon/layout/activity_admin_account.xml similarity index 99% rename from app/src/main/res/layout/activity_admin_account.xml rename to app/src/main/res/layouts/mastodon/layout/activity_admin_account.xml index 57f0e20f..888baf83 100644 --- a/app/src/main/res/layout/activity_admin_account.xml +++ b/app/src/main/res/layouts/mastodon/layout/activity_admin_account.xml @@ -20,7 +20,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" - tools:context=".activities.ProfileActivity"> + tools:context=".mastodon.activities.ProfileActivity"> + tools:context=".mastodon.activities.ContextActivity"> - + tools:context=".mastodon.activities.ProfileActivity"> + tools:context=".mastodon.activities.ProfileActivity"> + tools:context=".mastodon.activities.ScheduledActivity"> - - - - - - - - - - + tools:context=".mastodon.activities.ComposeActivity"> + android:name="app.fedilab.android.mastodon.activities.EditProfileActivity" /> diff --git a/app/src/main/res/xml/pref_extra_features.xml b/app/src/main/res/xml/pref_extra_features.xml index 26af2edf..997a02ed 100644 --- a/app/src/main/res/xml/pref_extra_features.xml +++ b/app/src/main/res/xml/pref_extra_features.xml @@ -8,7 +8,7 @@ app:singleLineTitle="false" app:summary="@string/set_extand_extra_features" app:title="@string/set_extand_extra_features_title" /> - - + - - + - - - - + \ No newline at end of file