diff options
Diffstat (limited to 'src/main/java/de/pixart')
5 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AudioPlayer.java b/src/main/java/de/pixart/messenger/services/AudioPlayer.java index 985280554..e41982be3 100644 --- a/src/main/java/de/pixart/messenger/services/AudioPlayer.java +++ b/src/main/java/de/pixart/messenger/services/AudioPlayer.java @@ -378,6 +378,7 @@ public class AudioPlayer implements View.OnClickListener, MediaPlayer.OnCompleti try { ViewHolder currentViewHolder = getCurrentViewHolder(); if (currentViewHolder != null) { + messageAdapter.getActivity().setVolumeControlStream(streamType); play(currentViewHolder, currentlyPlayingMessage, streamType == AudioManager.STREAM_VOICE_CALL, progress); } } catch (Exception e) { diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 01fdb7c0e..98f69a29c 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -243,6 +243,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers view.setMaxHeight(R.dimen.avatar_big); view.setMaxWidth(R.dimen.avatar_big); view.setBackgroundColor(Color.WHITE); + view.setScaleType(ImageView.ScaleType.FIT_XY); AvatarWorkerTask.loadAvatar(mConversation, view, R.dimen.avatar_big); AlertDialog.Builder builder = new AlertDialog.Builder(ConferenceDetailsActivity.this); builder.setView(view); diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 968042689..15f5b0058 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -559,6 +559,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp view.setMaxHeight(R.dimen.avatar_big); view.setMaxWidth(R.dimen.avatar_big); view.setBackgroundColor(Color.WHITE); + view.setScaleType(ImageView.ScaleType.FIT_XY); AvatarWorkerTask.loadAvatar(mConversation, view, R.dimen.avatar_big); AlertDialog.Builder builder = new AlertDialog.Builder(ContactDetailsActivity.this); builder.setView(view); diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index b0d985f63..b2a1c8969 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2015,6 +2015,11 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } public void privateMessageWith(final Jid counterpart) { + final Jid tcp = conversation.getMucOptions().getTrueCounterpart(counterpart); + if (!getConversation().getMucOptions().isUserInRoom(counterpart) && getConversation().getMucOptions().findUserByRealJid(tcp == null ? null : tcp.asBareJid()) == null) { + Toast.makeText(getActivity(), activity.getString(R.string.user_has_left_conference, counterpart.getResource()), Toast.LENGTH_SHORT).show(); + return; + } if (conversation.setOutgoingChatState(Config.DEFAULT_CHATSTATE)) { activity.xmppConnectionService.sendChatState(conversation); } diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 5eb9619c7..e1abbe593 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -26,7 +26,6 @@ import android.graphics.Point; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; -import android.media.AudioManager; import android.net.ConnectivityManager; import android.net.Uri; import android.os.AsyncTask; @@ -401,7 +400,6 @@ public abstract class XmppActivity extends ActionBarActivity { super.onCreate(savedInstanceState); this.mTheme = findTheme(); setTheme(this.mTheme); - setVolumeControlStream(AudioManager.STREAM_MUSIC); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); new EmojiService(this).init(getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji))); |