Commit e429e53c authored by Thomas Markiewicz's avatar Thomas Markiewicz

Merged upstream Tusky 8.0

parents 1ff8947b dc76a82f
Pipeline #20089 passed with stage
in 5 minutes and 33 seconds
open_collective: tusky
CHANGES
=======
Version 1.1.0
-------------------------------------------------------------
* Merged upstream Tusky version 8.0
Version 1.0.0
-------------------------------------------------------------
......
......@@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
def getGitSha = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short' , 'HEAD'
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
......@@ -18,8 +18,8 @@ android {
applicationId "com.keylesspalace.tusky"
minSdkVersion 21
targetSdkVersion 28
versionCode 62
versionName "7.1"
versionCode 64
versionName "8.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
......@@ -44,20 +44,30 @@ android {
proguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug { }
debug {}
}
flavorDimensions "color"
productFlavors {
blue { }
blue {}
green {
applicationIdSuffix ".test"
versionNameSuffix "-"+getGitSha()
versionNameSuffix "-" + getGitSha()
}
libremsocial {
applicationId "one.librem.social"
versionCode rootProject.ext.versionCodeProp
versionName rootProject.ext.versionNameProp
// major.minor.patch = release version that gets tagged
// major.minor.patch-SNAPSHOT = builds from `develop` branch
// major.minor.patch-RCXX = release candidate builds from the `release` branch (XX must be less then 99)
versionName = "1.1.0-SNAPSHOT"
// (major * 1000000) + (minor * 10000) + (patch * 100) + candidate;
// where candidate
// = 00 for -SNAPSHOT
// = 01..98 for -RC1..98
// = 99 for the final release
versionCode = 1010000
}
}
......@@ -100,7 +110,8 @@ project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
}
}
ext.daggerVersion = '2.22.1'
ext.daggerVersion = '2.23.1'
ext.retrofitVersion = '2.6.0'
// if libraries are changed here, they should also be changed in LicenseActivity
dependencies {
......@@ -116,11 +127,11 @@ dependencies {
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation 'com.squareup.okhttp3:okhttp:3.14.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.2'
implementation 'org.conscrypt:conscrypt-android:2.1.0'
implementation 'com.github.connyduck:sparkbutton:2.0.0'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
......@@ -133,33 +144,33 @@ dependencies {
// EmojiCompat
implementation 'androidx.emoji:emoji:1.0.0'
implementation 'androidx.emoji:emoji-appcompat:1.0.0'
implementation 'de.c1710:filemojicompat:1.0.14'
implementation 'de.c1710:filemojicompat:1.0.17'
// architecture components
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
//room
implementation 'androidx.room:room-runtime:2.0.0'
kapt 'androidx.room:room-compiler:2.0.0'
implementation 'androidx.room:room-rxjava2:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.room:room-runtime:2.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
kapt 'androidx.room:room-compiler:2.1.0'
implementation 'androidx.room:room-rxjava2:2.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
testImplementation 'org.robolectric:robolectric:4.2.1'
testImplementation 'org.mockito:mockito-inline:2.27.0'
testImplementation 'org.robolectric:robolectric:4.3'
testImplementation 'org.mockito:mockito-inline:2.28.2'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'android.arch.persistence.room:testing:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
testImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
testImplementation 'androidx.test.ext:junit:1.1.1'
debugImplementation 'im.dino:dbinspector:3.4.1@aar'
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.3.0'
implementation 'com.uber.autodispose:autodispose:1.3.0'
implementation 'androidx.paging:paging-runtime-ktx:2.1.0'
......@@ -167,4 +178,8 @@ dependencies {
//Glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
implementation 'jp.wasabeef:glide-transformations:3.1.1' // intentionally use 3.x version because of 2mb smaller apk
//Add some useful extensions
implementation 'androidx.core:core-ktx:1.2.0-alpha01'
}
......@@ -94,9 +94,10 @@
-dontwarn com.google.errorprone.annotations.*
# work around a bug in proguard
# see https://sourceforge.net/p/proguard/bugs/729/
-keepnames public interface com.uber.autodispose.lifecycle.CorrespondingEventsFunction { *; }
# without this emoji font downloading fails with AbstractMethodError
-keep class * extends android.os.AsyncTask {
public *;
}
# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
......
......@@ -101,9 +101,7 @@
<activity android:name=".AccountListActivity" />
<activity android:name=".AboutActivity" />
<activity android:name=".TabPreferenceActivity" />
<activity
android:name=".ReportActivity"
android:windowSoftInputMode="stateVisible|adjustResize" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
......@@ -119,6 +117,9 @@
<activity android:name=".ModalTimelineActivity" />
<activity android:name=".LicenseActivity" />
<activity android:name=".FiltersActivity" />
<activity android:name=".components.report.ReportActivity"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity android:name=".components.instancemute.InstanceListActivity" />
<receiver android:name=".receiver.NotificationClearBroadcastReceiver" />
......@@ -160,4 +161,4 @@
</provider>
</application>
</manifest>
\ No newline at end of file
</manifest>
......@@ -33,7 +33,6 @@ import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityOptionsCompat
import androidx.core.content.ContextCompat
import androidx.emoji.text.EmojiCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.recyclerview.widget.LinearLayoutManager
......@@ -53,18 +52,17 @@ import com.keylesspalace.tusky.interfaces.ReselectableFragment
import com.keylesspalace.tusky.pager.AccountPagerAdapter
import com.keylesspalace.tusky.util.*
import com.keylesspalace.tusky.viewmodel.AccountViewModel
import dagger.android.AndroidInjector
import dagger.android.DispatchingAndroidInjector
import dagger.android.support.HasSupportFragmentInjector
import dagger.android.HasAndroidInjector
import kotlinx.android.synthetic.main.activity_account.*
import kotlinx.android.synthetic.main.view_account_moved.*
import java.text.NumberFormat
import javax.inject.Inject
class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportFragmentInjector, LinkListener {
class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInjector, LinkListener {
@Inject
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Fragment>
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Any>
@Inject
lateinit var viewModelFactory: ViewModelFactory
......@@ -78,6 +76,8 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
private var showingReblogs: Boolean = false
private var loadedAccount: Account? = null
private var animateAvatar: Boolean = false
// fields for scroll animation
private var hideFab: Boolean = false
private var oldOffset: Int = 0
......@@ -89,14 +89,11 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
private var statusBarColorTransparent: Int = 0
@ColorInt
private var statusBarColorOpaque: Int = 0
@ColorInt
private var textColorPrimary: Int = 0
@ColorInt
private var textColorSecondary: Int = 0
private var avatarSize: Float = 0f
@Px
private var titleVisibleHeight: Int = 0
private lateinit var domain: String
private enum class FollowState {
NOT_FOLLOWING,
......@@ -120,7 +117,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
updateButtons()
}
hideFab = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("fabHide", false)
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
animateAvatar = sharedPrefs.getBoolean("animateGifAvatars", false)
hideFab = sharedPrefs.getBoolean("fabHide", false)
loadResources()
setupToolbar()
......@@ -138,8 +137,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
backgroundColor = ThemeUtils.getColor(this, android.R.attr.colorBackground)
statusBarColorTransparent = ContextCompat.getColor(this, R.color.header_background_filter)
statusBarColorOpaque = ThemeUtils.getColor(this, R.attr.colorPrimaryDark)
textColorPrimary = ThemeUtils.getColor(this, android.R.attr.textColorPrimary)
textColorSecondary = ThemeUtils.getColor(this, android.R.attr.textColorSecondary)
avatarSize = resources.getDimension(R.dimen.account_activity_avatar_size)
titleVisibleHeight = resources.getDimensionPixelSize(R.dimen.account_activity_scroll_title_visible_height)
}
......@@ -243,13 +240,11 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
override fun onOffsetChanged(appBarLayout: AppBarLayout, verticalOffset: Int) {
@AttrRes val attribute = if (titleVisibleHeight + verticalOffset < 0) {
accountToolbar.setTitleTextColor(textColorPrimary)
accountToolbar.setSubtitleTextColor(textColorSecondary)
supportActionBar?.setDisplayShowTitleEnabled(true)
R.attr.account_toolbar_icon_tint_collapsed
} else {
accountToolbar.setTitleTextColor(Color.TRANSPARENT)
accountToolbar.setSubtitleTextColor(Color.TRANSPARENT)
supportActionBar?.setDisplayShowTitleEnabled(false)
R.attr.account_toolbar_icon_tint_uncollapsed
}
......@@ -379,11 +374,16 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
*/
private fun updateAccountAvatar() {
loadedAccount?.let { account ->
loadAvatar(
account.avatar,
accountAvatarImageView,
resources.getDimensionPixelSize(R.dimen.avatar_radius_94dp),
animateAvatar
)
Glide.with(this)
.load(account.avatar)
.placeholder(R.drawable.avatar_default)
.into(accountAvatarImageView)
Glide.with(this)
.asBitmap()
.load(account.header)
.centerCrop()
.into(accountHeaderImageView)
......@@ -405,10 +405,13 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
*/
private fun updateToolbar() {
loadedAccount?.let { account ->
val emojifiedName = CustomEmojiHelper.emojifyString(account.name, account.emojis, accountToolbar)
try {
supportActionBar?.title = EmojiCompat.get().process(account.name)
supportActionBar?.title = EmojiCompat.get().process(emojifiedName)
} catch (e: IllegalStateException) {
supportActionBar?.title = account.name
supportActionBar?.title = emojifiedName
}
supportActionBar?.subtitle = String.format(getString(R.string.status_username_format), account.username)
}
......@@ -430,10 +433,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
accountMovedDisplayName.text = movedAccount.name
accountMovedUsername.text = getString(R.string.status_username_format, movedAccount.username)
Glide.with(this)
.load(movedAccount.avatar)
.placeholder(R.drawable.avatar_default)
.into(accountMovedAvatar)
val avatarRadius = resources.getDimensionPixelSize(R.dimen.avatar_radius_48dp)
loadAvatar(movedAccount.avatar, accountMovedAvatar, avatarRadius, animateAvatar)
accountMovedText.text = getString(R.string.account_moved_description, movedAccount.displayName)
......@@ -600,6 +602,17 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
getString(R.string.action_mute)
}
if (loadedAccount != null) {
val muteDomain = menu.findItem(R.id.action_mute_domain)
domain = LinkHelper.getDomain(loadedAccount?.url)
if (domain.isEmpty()) {
// If we can't get the domain, there's no way we can mute it anyway...
menu.removeItem(R.id.action_mute_domain)
} else {
muteDomain.title = getString(R.string.action_mute_domain, domain)
}
}
if (followState == FollowState.FOLLOWING) {
val showReblogs = menu.findItem(R.id.action_show_reblogs)
showReblogs.title = if (showingReblogs) {
......@@ -617,6 +630,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
menu.removeItem(R.id.action_follow)
menu.removeItem(R.id.action_block)
menu.removeItem(R.id.action_mute)
menu.removeItem(R.id.action_mute_domain)
menu.removeItem(R.id.action_show_reblogs)
}
......@@ -639,6 +653,14 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
.show()
}
private fun showMuteDomainWarningDialog(instance: String) {
AlertDialog.Builder(this)
.setMessage(getString(R.string.mute_domain_warning, instance))
.setPositiveButton(getString(R.string.mute_domain_warning_dialog_ok)) { _, _ -> viewModel.muteDomain(instance) }
.setNegativeButton(android.R.string.cancel, null)
.show()
}
private fun mention() {
loadedAccount?.let {
val intent = ComposeActivity.IntentBuilder()
......@@ -693,7 +715,10 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
viewModel.changeMuteState()
return true
}
R.id.action_mute_domain -> {
showMuteDomainWarningDialog(domain)
return true
}
R.id.action_show_reblogs -> {
viewModel.changeShowReblogsState()
return true
......@@ -708,9 +733,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
} else null
}
override fun supportFragmentInjector(): AndroidInjector<Fragment> {
return dispatchingAndroidInjector
}
override fun androidInjector() = dispatchingAndroidInjector
companion object {
......
......@@ -18,22 +18,17 @@ package com.keylesspalace.tusky
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.MenuItem
import com.keylesspalace.tusky.fragment.AccountListFragment
import javax.inject.Inject
import dagger.android.AndroidInjector
import dagger.android.DispatchingAndroidInjector
import dagger.android.support.HasSupportFragmentInjector
import dagger.android.HasAndroidInjector
import kotlinx.android.synthetic.main.toolbar_basic.*
import javax.inject.Inject
class AccountListActivity : BaseActivity(), HasSupportFragmentInjector {
class AccountListActivity : BaseActivity(), HasAndroidInjector {
@Inject
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Fragment>
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Any>
enum class Type {
FOLLOWS,
......@@ -83,9 +78,7 @@ class AccountListActivity : BaseActivity(), HasSupportFragmentInjector {
return super.onOptionsItemSelected(item)
}
override fun supportFragmentInjector(): AndroidInjector<Fragment>? {
return dispatchingAndroidInjector
}
override fun androidInjector() = dispatchingAndroidInjector
companion object {
private const val EXTRA_TYPE = "type"
......
......@@ -22,16 +22,19 @@ import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.util.TypedValue;
import android.view.Menu;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.google.android.material.snackbar.Snackbar;
import com.keylesspalace.tusky.adapter.AccountSelectionAdapter;
import com.keylesspalace.tusky.db.AccountEntity;
......@@ -47,13 +50,6 @@ import java.util.List;
import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import retrofit2.Call;
public abstract class BaseActivity extends AppCompatActivity implements Injectable {
......@@ -92,11 +88,6 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
setTaskDescription(new ActivityManager.TaskDescription(appName, appIcon, recentsBackgroundColor));
long accountId = getIntent().getLongExtra("account", -1);
if (accountId != -1) {
accountManager.setActiveAccount(accountId);
}
int style = textStyle(preferences.getString("statusTextSize", "medium"));
getTheme().applyStyle(style, false);
......@@ -165,24 +156,6 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
TypedValue value = new TypedValue();
int color;
if (getTheme().resolveAttribute(R.attr.toolbar_icon_tint, value, true)) {
color = value.data;
} else {
color = Color.WHITE;
}
for (int i = 0; i < menu.size(); i++) {
Drawable icon = menu.getItem(i).getIcon();
if (icon != null) {
icon.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
}
}
return super.onCreateOptionsMenu(menu);
}
protected void showErrorDialog(View anyView, @StringRes int descriptionId, @StringRes int actionId, View.OnClickListener listener) {
if (anyView != null) {
Snackbar bar = Snackbar.make(anyView, getString(descriptionId), Snackbar.LENGTH_SHORT);
......
......@@ -35,6 +35,8 @@ import android.view.MenuItem
import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.FitCenter
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.keylesspalace.tusky.adapter.AccountFieldEditAdapter
import com.keylesspalace.tusky.di.Injectable
import com.keylesspalace.tusky.di.ViewModelFactory
......@@ -136,6 +138,10 @@ class EditProfileActivity : BaseActivity(), Injectable {
Glide.with(this)
.load(me.avatar)
.placeholder(R.drawable.avatar_default)
.transform(
FitCenter(),
RoundedCorners(resources.getDimensionPixelSize(R.dimen.avatar_radius_80dp))
)
.into(avatarPreview)
}
......@@ -158,8 +164,8 @@ class EditProfileActivity : BaseActivity(), Injectable {
}
})
observeImage(viewModel.avatarData, avatarPreview, avatarProgressBar)
observeImage(viewModel.headerData, headerPreview, headerProgressBar)
observeImage(viewModel.avatarData, avatarPreview, avatarProgressBar, true)
observeImage(viewModel.headerData, headerPreview, headerProgressBar, false)
viewModel.saveData.observe(this, Observer<Resource<Nothing>> {
when(it) {
......@@ -192,12 +198,26 @@ class EditProfileActivity : BaseActivity(), Injectable {
}
}
private fun observeImage(liveData: LiveData<Resource<Bitmap>>, imageView: ImageView, progressBar: View) {
private fun observeImage(liveData: LiveData<Resource<Bitmap>>,
imageView: ImageView,
progressBar: View,
roundedCorners: Boolean) {
liveData.observe(this, Observer<Resource<Bitmap>> {
when (it) {
is Success -> {
imageView.setImageBitmap(it.data)
val glide = Glide.with(imageView)
.load(it.data)
if (roundedCorners) {
glide.transform(
FitCenter(),
RoundedCorners(resources.getDimensionPixelSize(R.dimen.avatar_radius_80dp))
)
}
glide.into(imageView)
imageView.show()
progressBar.hide()
}
......
......@@ -36,10 +36,14 @@ public class EmojiPreference extends Preference {
private static final int[] viewIds = {
R.id.item_nomoji,
R.id.item_blobmoji,
R.id.item_twemoji};
R.id.item_twemoji,
R.id.item_notoemoji};
private ArrayList<RadioButton> radioButtons = new ArrayList<>();
private boolean updated, currentNeedsUpdate;
public EmojiPreference(Context context, AttributeSet attrs) {
super(context, attrs);
......@@ -154,6 +158,11 @@ public class EmojiPreference extends Preference {
private void finishDownload(EmojiCompatFont font, View container) {
select(font, container.findViewById(R.id.emojicompat_radio));
updateItem(font, container);
// Set the flag to restart the app (because an update has been downloaded)
if (selected == original && currentNeedsUpdate) {
updated = true;
currentNeedsUpdate = false;
}
}
/**
......@@ -208,6 +217,10 @@ public class EmojiPreference extends Preference {
// Select it if necessary
if(font == selected) {
radio.setChecked(true);
// Update available
if (!font.isDownloaded(getContext())) {
currentNeedsUpdate = true;
}
}
else {
radio.setChecked(false);
......@@ -236,7 +249,7 @@ public class EmojiPreference extends Preference {
*/
private void onDialogOk() {
saveSelectedFont();
if(selected != original) {
if (selected != original || updated) {
new AlertDialog.Builder(getContext())
.setTitle(R.string.restart_required)
.setMessage(R.string.restart_emoji)
......
......@@ -16,14 +16,13 @@
package com.keylesspalace.tusky;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import com.keylesspalace.tusky.fragment.TimelineFragment;
......@@ -31,12 +30,12 @@ import javax.inject.Inject;
import dagger.android.AndroidInjector;
import dagger.android.DispatchingAndroidInjector;
import dagger.android.support.HasSupportFragmentInjector;
import dagger.android.HasAndroidInjector;