aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-01-25 22:56:54 +0100
committerChristian Schneppe <christian@pix-art.de>2019-01-25 22:56:54 +0100
commitd4a584c88a80ebf3f48bbe5ecb9860de3c59dbbb (patch)
treee59691eb30611828df4ef49db028f5eedbc27a26 /src/main/java/de/pixart
parent13407cb36d254b1fdb6e6f8d72391363881f3035 (diff)
modify emoji integration
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationsActivity.java5
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareWithActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java5
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java4
6 files changed, 4 insertions, 16 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
index 7c9a5830b..ec9957b7c 100644
--- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
@@ -289,8 +289,6 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
- new EmojiService(this).init(useBundledEmoji);
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_muc_details);
this.binding.changeConferenceButton.setOnClickListener(this.mChangeConferenceSettings);
this.binding.invite.setOnClickListener(inviteListener);
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
index 7dca7d4c1..807fdf94d 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
@@ -418,7 +418,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
super.onCreate(savedInstanceState);
ConversationMenuConfigurator.reloadFeatures(this);
OmemoSetting.load(this);
- new EmojiService(this).init(useBundledEmoji());
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
setSupportActionBar((Toolbar) binding.toolbar);
configureActionBar(getSupportActionBar());
@@ -821,10 +820,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
}
}
- public boolean useBundledEmoji() {
- return getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
- }
-
public void verifyOtrSessionDialog(final Conversation conversation, View view) {
if (!conversation.hasValidOtrSession() || conversation.getOtrSession().getSessionStatus() != SessionStatus.ENCRYPTED) {
Toast.makeText(this, R.string.otr_session_not_started, Toast.LENGTH_LONG).show();
diff --git a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
index 8e80208d0..6306a004c 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
@@ -73,8 +73,6 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
- new EmojiService(this).init(useBundledEmoji);
setContentView(R.layout.activity_share_with);
setSupportActionBar(findViewById(R.id.toolbar));
if (getSupportActionBar() != null) {
diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
index d8c565345..3e8d07dd2 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
@@ -65,8 +65,6 @@ public class ShowLocationActivity extends XmppActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
- new EmojiService(this).init(useBundledEmoji);
setContentView(R.layout.activity_show_locaction);
setTitle(getString(R.string.show_location));
setSupportActionBar(findViewById(R.id.toolbar));
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 825494d90..9900c7b9b 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -261,7 +261,6 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- new EmojiService(this).init(useBundledEmoji());
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation);
Toolbar toolbar = (Toolbar) binding.toolbar;
setSupportActionBar(toolbar);
@@ -939,10 +938,6 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
finish();
}
- public boolean useBundledEmoji() {
- return getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
- }
-
@Override
public void onCreateDialogPositiveClick(Spinner spinner, String name) {
if (!xmppConnectionServiceBound) {
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index f5a1eac96..ed2a56a31 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -76,6 +76,7 @@ import de.pixart.messenger.entities.Message;
import de.pixart.messenger.entities.Presences;
import de.pixart.messenger.services.AvatarService;
import de.pixart.messenger.services.BarcodeProvider;
+import de.pixart.messenger.services.EmojiService;
import de.pixart.messenger.services.UpdateService;
import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.services.XmppConnectionService.XmppConnectionBinder;
@@ -91,6 +92,8 @@ import de.pixart.messenger.xmpp.OnUpdateBlocklist;
import pl.droidsonroids.gif.GifDrawable;
import rocks.xmpp.addr.Jid;
+import static de.pixart.messenger.ui.SettingsActivity.USE_BUNDLED_EMOJIS;
+
public abstract class XmppActivity extends ActionBarActivity {
protected static final int REQUEST_ANNOUNCE_PGP = 0x0101;
@@ -395,6 +398,7 @@ public abstract class XmppActivity extends ActionBarActivity {
setVolumeControlStream(AudioManager.STREAM_NOTIFICATION);
metrics = getResources().getDisplayMetrics();
ExceptionHelper.init(getApplicationContext());
+ new EmojiService(this).init(getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji)));
this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
mColorRed = ContextCompat.getColor(this, R.color.red800);
if (isDarkTheme()) {