Commit d6e73438 authored by Thomas's avatar Thomas
Browse files

Merge branch 'develop'

# Conflicts:
#	app/build.gradle
parents 4647167d ea824daa
Pipeline #302414 passed with stages
in 6 minutes and 16 seconds
......@@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 366
versionName "2.35.3"
versionCode 368
versionName "2.35.4"
multiDexEnabled true
renderscriptTargetApi 28 as int
renderscriptSupportModeEnabled true
......@@ -87,7 +87,7 @@ dependencies {
}
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
annotationProcessor 'com.android.support:support-annotations:28.0.0'
implementation "org.conscrypt:conscrypt-android:2.2.1"
implementation "org.conscrypt:conscrypt-android:2.4.0"
implementation "com.evernote:android-job:1.2.6"
implementation "com.google.code.gson:gson:2.8.5"
implementation "com.google.guava:guava:28.2-android"
......@@ -128,7 +128,7 @@ dependencies {
implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.2.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'com.github.smarteist:autoimageslider:1.3.2'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
implementation 'com.jaredrummler:cyanea:1.0.2'
}
Added:
- 100 Mb of cache for videos (can be changed in settings)
- Bibliogram support (default: disabled)
- Ouiches support for audio
Changed:
- Closing media
- Smoother settings
Fixed:
- Peertube comments
- Some layout issues
- Some other crashes
\ No newline at end of file
Added:
- 100 Mb of cache for videos (can be changed in settings)
- Bibliogram support (default: disabled)
- Ouiches support for audio
Changed:
- Closing media
- Smoother settings
Fixed:
- Peertube comments
- Some layout issues
- Some other crashes
\ No newline at end of file
......@@ -15,8 +15,8 @@ package app.fedilab.android.activities;
* see <http://www.gnu.org/licenses>. */
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask;
......@@ -34,6 +34,7 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.Group;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
......@@ -175,8 +176,18 @@ public class AccountReportActivity extends BaseActivity implements OnAdminAction
public void onAdminAction(APIResponse apiResponse) {
if (apiResponse.getError() != null) {
if (apiResponse.getError().getStatusCode() == 403) {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
int style;
if (theme == Helper.THEME_DARK) {
style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) {
style = R.style.DialogBlack;
} else {
style = R.style.Dialog;
}
AlertDialog.Builder builderInner;
builderInner = new AlertDialog.Builder(AccountReportActivity.this, R.style.AppThemeDark);
builderInner = new AlertDialog.Builder(AccountReportActivity.this, style);
builderInner.setTitle(R.string.reconnect_account);
builderInner.setMessage(R.string.reconnect_account_message);
builderInner.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
......
......@@ -52,7 +52,7 @@ public class BaseActivity extends CyaneaAppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (BuildConfig.DEBUG) {
/*if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
......@@ -67,7 +67,7 @@ public class BaseActivity extends CyaneaAppCompatActivity {
.penaltyLog()
// .penaltyDeath()
.build());
}
}*/
canShowActionMode = true;
super.onCreate(savedInstanceState);
......
package app.fedilab.android.activities;
import android.annotation.SuppressLint;
import androidx.appcompat.app.AppCompatActivity;
import com.vanniktech.emoji.EmojiManager;
import com.vanniktech.emoji.one.EmojiOneProvider;
import app.fedilab.android.helper.Helper;
/**
* Created by Thomas on 16/05/2020.
* Fragment base activity which updates security provider
*/
@SuppressLint("Registered")
public class BaseFragmentActivity extends AppCompatActivity {
static {
Helper.installProvider();
EmojiManager.install(new EmojiOneProvider());
}
}
......@@ -1258,7 +1258,7 @@ public abstract class BaseMainActivity extends BaseActivity
int lastReleaseNoteRead = sharedpreferences.getInt(Helper.SET_POPUP_RELEASE_NOTES, 0);
int versionCode = BuildConfig.VERSION_CODE;
if (lastReleaseNoteRead != versionCode ) { //Need to push release notes
if (lastReleaseNoteRead != versionCode) { //Need to push release notes
if (social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
new RetrieveRemoteDataAsyncTask(BaseMainActivity.this, BaseMainActivity.this).execute();
}
......@@ -1279,12 +1279,12 @@ public abstract class BaseMainActivity extends BaseActivity
Button liberapay_support = dialogReleaseNoteView.findViewById(R.id.liberapay_support);
release_title.setText(getString(R.string.release_note_title, BuildConfig.VERSION_NAME));
release_notes.setText(finalContent);
if( BuildConfig.DONATIONS) {
if (BuildConfig.DONATIONS) {
liberapay_support.setVisibility(View.VISIBLE);
}else{
} else {
liberapay_support.setVisibility(View.GONE);
}
liberapay_support.setOnClickListener(v->{
liberapay_support.setOnClickListener(v -> {
Intent intentLiberapay = new Intent(Intent.ACTION_VIEW);
intentLiberapay.setData(Uri.parse("https://liberapay.com/tom79"));
try {
......@@ -1693,7 +1693,7 @@ public abstract class BaseMainActivity extends BaseActivity
}
});
}
if( trackingDomains != null){
if (trackingDomains != null) {
trackingDomains = null;
}
if (hidde_menu != null)
......
......@@ -60,10 +60,10 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.source.ExtractorMediaSource;
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.PlaybackControlView;
import com.google.android.exoplayer2.ui.SimpleExoPlayerView;
import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.exoplayer2.ui.PlayerView;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
import com.google.android.exoplayer2.util.Util;
......@@ -96,6 +96,7 @@ import app.fedilab.android.client.Entities.Status;
import app.fedilab.android.client.Entities.StatusDrawerParams;
import app.fedilab.android.client.TLSSocketFactory;
import app.fedilab.android.drawers.StatusListAdapter;
import app.fedilab.android.helper.CacheDataSourceFactory;
import app.fedilab.android.helper.CrossActions;
import app.fedilab.android.helper.FullScreenMediaController;
import app.fedilab.android.helper.Helper;
......@@ -130,7 +131,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
private ScrollView peertube_information_container;
private Peertube peertube;
private TextView toolbar_title;
private SimpleExoPlayerView playerView;
private PlayerView playerView;
private SimpleExoPlayer player;
private boolean fullScreenMode;
private Dialog fullScreenDialog;
......@@ -278,10 +279,8 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
peertube_information_container.setVisibility(View.VISIBLE);
}
});
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, null);
if (user_agent != null) {
webview_video.getSettings().setUserAgentString(user_agent);
}
String user_agent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
webview_video.getSettings().setUserAgentString(user_agent);
webview_video.getSettings().setAllowFileAccess(true);
webview_video.setWebChromeClient(mastalabWebChromeClient);
webview_video.getSettings().setDomStorageEnabled(true);
......@@ -369,40 +368,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
case R.id.action_comment:
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
Toasty.info(PeertubeActivity.this, getString(R.string.retrieve_remote_status), Toast.LENGTH_LONG).show();
new AsyncTask<Void, Void, Void>() {
private List<app.fedilab.android.client.Entities.Status> remoteStatuses;
private WeakReference<Context> contextReference = new WeakReference<>(PeertubeActivity.this);
@Override
protected Void doInBackground(Void... voids) {
if (peertube != null) {
APIResponse search = new API(contextReference.get()).search("https://" + peertube.getAccount().getHost() + "/videos/watch/" + peertube.getUuid());
if (search != null && search.getResults() != null) {
remoteStatuses = search.getResults().getStatuses();
}
}
return null;
}
@Override
protected void onPostExecute(Void result) {
Intent intent = new Intent(contextReference.get(), TootActivity.class);
Bundle b = new Bundle();
if (remoteStatuses == null || remoteStatuses.size() == 0) {
Toasty.error(contextReference.get(), getString(R.string.toast_error), Toast.LENGTH_SHORT).show();
return;
}
if (remoteStatuses.get(0).getReblog() != null) {
b.putParcelable("tootReply", remoteStatuses.get(0).getReblog());
} else {
b.putParcelable("tootReply", remoteStatuses.get(0));
}
intent.putExtras(b); //Put your id to your next Intent
contextReference.get().startActivity(intent);
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new commentTask(new WeakReference<>(PeertubeActivity.this), peertube).execute();
} else if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
if (!peertube.isCommentsEnabled()) {
Toasty.info(PeertubeActivity.this, getString(R.string.comment_no_allowed_peertube), Toast.LENGTH_LONG).show();
......@@ -583,16 +549,24 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
if (mode == Helper.VIDEO_MODE_DIRECT) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, "Mastalab"), null);
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
ProgressiveMediaSource videoSource;
if (video_cache == 0) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, userAgent), null);
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
} else {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, apiResponse.getPeertubes().get(0).isStreamService())));
}
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
playerView.setPlayer(player);
loader.setVisibility(View.GONE);
player.prepare(videoSource);
player.setPlayWhenReady(true);
}
......@@ -662,7 +636,6 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
});
}
@Override
public void onConfigurationChanged(@NotNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
......@@ -745,7 +718,6 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
}
}
@Override
public void onResume() {
super.onResume();
......@@ -777,7 +749,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
if (playerView != null) {
loader.setVisibility(View.VISIBLE);
long position = player.getCurrentPosition();
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
resolution = controlView.findViewById(R.id.resolution);
resolution.setText(String.format("%sp", res));
if (mode == Helper.VIDEO_MODE_DIRECT) {
......@@ -786,11 +758,19 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
playerView.setPlayer(player);
loader.setVisibility(View.GONE);
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, "Mastalab"), null);
ExtractorMediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
String userAgent = sharedpreferences.getString(Helper.SET_CUSTOM_USER_AGENT, Helper.USER_AGENT);
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
ProgressiveMediaSource videoSource;
if (video_cache == 0) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, userAgent), null);
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
} else {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
.createMediaSource(Uri.parse(peertube.getFileUrl(res, peertube.isStreamService())));
}
player.prepare(videoSource);
player.seekTo(0, position);
player.setPlayWhenReady(true);
......@@ -809,7 +789,6 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
}
private void initFullscreenDialog() {
fullScreenDialog = new Dialog(this, android.R.style.Theme_Black_NoTitleBar_Fullscreen) {
......@@ -830,7 +809,6 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
fullScreenDialog.show();
}
private void closeFullscreenDialog() {
((ViewGroup) playerView.getParent()).removeView(playerView);
......@@ -842,7 +820,7 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
private void initFullscreenButton() {
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
fullScreenIcon = controlView.findViewById(R.id.exo_fullscreen_icon);
View fullScreenButton = controlView.findViewById(R.id.exo_fullscreen_button);
fullScreenButton.setOnClickListener(v -> {
......@@ -854,13 +832,12 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
}
private void initResolution() {
PlaybackControlView controlView = playerView.findViewById(R.id.exo_controller);
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
resolution = controlView.findViewById(R.id.resolution);
resolution.setText(String.format("%sp", peertube.getResolution().get(0)));
resolution.setOnClickListener(v -> displayResolution());
}
private void changeColor() {
if (peertube.getMyRating() != null && peertube.getMyRating().equals("like")) {
changeDrawableColor(PeertubeActivity.this, R.drawable.ic_thumb_up_peertube, R.color.positive_thumbs);
......@@ -882,4 +859,49 @@ public class PeertubeActivity extends BaseActivity implements OnRetrievePeertube
playlists = apiResponse.getPlaylists();
}
}
private static class commentTask extends AsyncTask<Void, Void, app.fedilab.android.client.Entities.Status> {
private WeakReference<Context> contextReference;
private Peertube peertube;
commentTask(WeakReference<Context> contextReference, Peertube peertube) {
this.peertube = peertube;
this.contextReference = contextReference;
}
@Override
protected app.fedilab.android.client.Entities.Status doInBackground(Void... voids) {
List<app.fedilab.android.client.Entities.Status> remoteStatuses = null;
if (peertube != null) {
APIResponse search = new API(contextReference.get()).search("https://" + peertube.getAccount().getHost() + "/videos/watch/" + peertube.getUuid());
if (search != null && search.getResults() != null) {
remoteStatuses = search.getResults().getStatuses();
}
}
if (remoteStatuses != null && remoteStatuses.size() > 0) {
return remoteStatuses.get(0);
} else {
return null;
}
}
@Override
protected void onPostExecute(app.fedilab.android.client.Entities.Status remoteStatuses) {
Intent intent = new Intent(contextReference.get(), TootActivity.class);
Bundle b = new Bundle();
if (remoteStatuses == null) {
Toasty.error(contextReference.get(), contextReference.get().getString(R.string.toast_error), Toast.LENGTH_SHORT).show();
return;
}
if (remoteStatuses.getReblog() != null) {
b.putParcelable("tootReply", remoteStatuses.getReblog());
} else {
b.putParcelable("tootReply", remoteStatuses);
}
intent.putExtras(b);
contextReference.get().startActivity(intent);
}
}
}
......@@ -80,6 +80,7 @@ public class PeertubeEditUploadActivity extends BaseActivity implements OnRetrie
private String videoId;
private Account channel;
@SuppressWarnings("SuspiciousMethodCalls")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -539,6 +540,7 @@ public class PeertubeEditUploadActivity extends BaseActivity implements OnRetrie
List<String> tags = peertube.getTags();
if (tags != null && tags.size() > 0) {
//noinspection ToArrayCallWithZeroLengthArrayArgument
String[] tagsA = tags.toArray(new String[tags.size()]);
p_video_tags.setTags(tagsA);
}
......
......@@ -16,6 +16,7 @@ package app.fedilab.android.activities;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
......@@ -193,6 +194,7 @@ public class PeertubeUploadActivity extends BaseActivity implements OnRetrievePe
}
@SuppressWarnings("SuspiciousMethodCalls")
@Override
public void onRetrievePeertubeChannels(APIResponse apiResponse) {
if (apiResponse.getError() != null || apiResponse.getAccounts() == null || apiResponse.getAccounts().size() == 0) {
......@@ -277,32 +279,29 @@ public class PeertubeUploadActivity extends BaseActivity implements OnRetrievePe
});
set_upload_file.setEnabled(true);
set_upload_file.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (ContextCompat.checkSelfPermission(PeertubeUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(PeertubeUploadActivity.this,
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
return;
}
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
intent.setType("*/*");
String[] mimetypes = {"video/*"};
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
startActivityForResult(intent, PICK_IVDEO);
} else {
intent.setType("video/*");
Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.toot_select_image));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{pickIntent});
startActivityForResult(chooserIntent, PICK_IVDEO);
}
set_upload_file.setOnClickListener(v -> {
if (ContextCompat.checkSelfPermission(PeertubeUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(PeertubeUploadActivity.this,
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
return;
}
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
intent.setType("*/*");
String[] mimetypes = {"video/*"};
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
startActivityForResult(intent, PICK_IVDEO);
} else {
intent.setType("video/*");
Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.toot_select_image));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{pickIntent});
startActivityForResult(chooserIntent, PICK_IVDEO);
}
});
//Manage languages
......@@ -391,6 +390,7 @@ public class PeertubeUploadActivity extends BaseActivity implements OnRetrievePe
exception.printStackTrace();
}
@SuppressLint("ApplySharedPref")
@Override
public void onCompleted(Context context, UploadInfo uploadInfo, ServerResponse serverResponse) {
try {
......
......@@ -154,7 +154,7 @@ public class SettingsActivity extends BaseActivity {
}
@Override
public void onDestroy(){
public void onDestroy() {
super.onDestroy();
}
......
......@@ -737,6 +737,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
attachments.add(attachment);
intent.putParcelableArrayListExtra("mediaArray", attachments);
b.putInt("position", 1);
b.putInt("bgcolor", getResources().getColor(R.color.cyanea_primary_dark));
intent.putExtras(b);
startActivity(intent);
});
......@@ -1330,8 +1331,13 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
return true;
case R.id.action_block:
builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style);
builderInner.setTitle(stringArrayConf[1]);
doActionAccount = API.StatusAction.BLOCK;
if (relationship.isBlocking()) {
builderInner.setTitle(stringArrayConf[5]);
doActionAccount = API.StatusAction.UNBLOCK;
} else {
builderInner.setTitle(stringArrayConf[1]);
doActionAccount = API.StatusAction.BLOCK;
}
break;
case R.id.action_block_instance:
builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style);
......
......@@ -24,7 +24,6 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
......@@ -49,11 +48,6 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.r0adkll.slidr.Slidr;
import com.r0adkll.slidr.model.SlidrConfig;
import com.r0adkll.slidr.model.SlidrInterface;
import com.r0adkll.slidr.model.SlidrPosition;
import org.jetbrains.annotations.NotNull;