Skip to content

Commit

Permalink
refactor: deleting legacy DomainManager.java implementation
Browse files Browse the repository at this point in the history
Remove DomainManager.java in favor of getWebUri
  • Loading branch information
LucasGGamerM committed Aug 23, 2023
1 parent e56263a commit ac3b6ad
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 109 deletions.
83 changes: 0 additions & 83 deletions mastodon/src/main/java/org/joinmastodon/android/DomainManager.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
import android.view.Menu;
import android.view.MenuInflater;

import org.joinmastodon.android.DomainManager;
import org.joinmastodon.android.MainActivity;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.tags.GetHashtag;
import org.joinmastodon.android.api.requests.timelines.GetPublicTimeline;
import org.joinmastodon.android.model.Filter;
import org.joinmastodon.android.model.Hashtag;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.TimelineDefinition;
import org.joinmastodon.android.ui.utils.UiUtils;
Expand All @@ -21,8 +17,6 @@
import java.util.List;
import java.util.stream.Collectors;

import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.api.SimpleCallback;

public class CustomLocalTimelineFragment extends PinnableStatusListFragment implements ProvidesAssistContent.ProvidesWebUri{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.view.ViewGroup;
import android.widget.Toast;

import org.joinmastodon.android.DomainManager;
import org.joinmastodon.android.E;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.tags.GetHashtag;
Expand Down Expand Up @@ -48,11 +47,6 @@ protected boolean wantsComposeButton() {
return true;
}

@Override
public String getDomain() {
return super.getDomain() + "/tags/" + hashtag;
}


@Override
public void onAttach(Activity activity){
Expand All @@ -64,7 +58,6 @@ public void onAttach(Activity activity){
all=getArguments().getStringArrayList("all");
none=getArguments().getStringArrayList("none");
setHasOptionsMenu(true);
DomainManager.getInstance().setCurrentDomain(getDomain());
}

private void updateTitle(String hashtagName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import android.transition.Fade;
import android.transition.TransitionManager;
import android.transition.TransitionSet;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down Expand Up @@ -56,9 +55,7 @@
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;

import org.joinmastodon.android.DomainManager;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.MainActivity;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountByID;
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
Expand Down Expand Up @@ -107,13 +104,9 @@
import java.util.Collections;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import me.grishka.appkit.Nav;
import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Fragment;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
Expand All @@ -14,7 +12,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation;
import android.view.animation.LinearInterpolator;
import android.widget.Button;
Expand All @@ -33,10 +30,8 @@
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import org.joinmastodon.android.DomainManager;
import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.PushSubscriptionManager;
import org.joinmastodon.android.api.session.AccountSession;
Expand Down Expand Up @@ -95,7 +90,6 @@ public void onCreate(Bundle savedInstanceState){
session = AccountSessionManager.getInstance().getAccount(accountID);
instance = AccountSessionManager.getInstance().getInstanceInfo(session.domain);
instanceName = UiUtils.getInstanceName(accountID);
DomainManager.getInstance().setCurrentDomain(session.domain + "/settings");

if (GithubSelfUpdater.needSelfUpdating())
E.register(this);
Expand Down

0 comments on commit ac3b6ad

Please sign in to comment.