Removed beta setting for ephemeral chat messages feature
This commit is contained in:
parent
9d41dc4026
commit
8844c732c1
6 changed files with 4 additions and 43 deletions
|
@ -18,6 +18,9 @@ Group changes to describe their impact on the project, as follows:
|
|||
|
||||
### Changed
|
||||
- Files from chat messages are now stored in a private space and will be deleted when the message or room will be deleted
|
||||
- SDK updated to 4.4 version
|
||||
- Fixed ANRs
|
||||
- Fixed various issues
|
||||
|
||||
## [4.2.3] - 2020-03-03
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 4290
|
||||
versionCode 4291
|
||||
versionName "${project.version}"
|
||||
applicationId getPackageName()
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -1124,10 +1124,6 @@ public class ChatMessagesFragment extends Fragment
|
|||
if (!mChatRoom.hasCapability(ChatRoomCapabilities.Encrypted.toInt())) {
|
||||
builder.removeItem(R.id.chat_room_participants_devices);
|
||||
builder.removeItem(R.id.chat_room_ephemeral_messages);
|
||||
} else {
|
||||
if (!LinphonePreferences.instance().isEphemeralMessagesEnabled()) {
|
||||
builder.removeItem(R.id.chat_room_ephemeral_messages);
|
||||
}
|
||||
}
|
||||
|
||||
builder.setCallback(
|
||||
|
|
|
@ -29,9 +29,7 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.Nullable;
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.R;
|
||||
import org.linphone.core.ChatRoom;
|
||||
import org.linphone.core.tools.Log;
|
||||
import org.linphone.mediastream.Version;
|
||||
import org.linphone.settings.widget.BasicSetting;
|
||||
|
@ -47,7 +45,6 @@ public class ChatSettingsFragment extends SettingsFragment {
|
|||
private BasicSetting mAndroidNotificationSettings;
|
||||
private ListSetting mAutoDownloadIncomingFilesPolicy;
|
||||
private SwitchSetting mHideEmptyRooms, mHideRemovedProxiesRooms, mMakeDownloadedImagesPublic;
|
||||
private SwitchSetting mEnableEphemeralBeta;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
@ -88,9 +85,6 @@ public class ChatSettingsFragment extends SettingsFragment {
|
|||
|
||||
mHideRemovedProxiesRooms =
|
||||
mRootView.findViewById(R.id.pref_android_app_hide_chat_rooms_from_removed_proxies);
|
||||
|
||||
mEnableEphemeralBeta =
|
||||
mRootView.findViewById(R.id.pref_android_app_enable_ephemeral_messages_beta);
|
||||
}
|
||||
|
||||
private void setListeners() {
|
||||
|
@ -172,19 +166,6 @@ public class ChatSettingsFragment extends SettingsFragment {
|
|||
LinphonePreferences.instance().setHideRemovedProxiesChatRooms(newValue);
|
||||
}
|
||||
});
|
||||
|
||||
mEnableEphemeralBeta.setListener(
|
||||
new SettingListenerBase() {
|
||||
@Override
|
||||
public void onBoolValueChanged(boolean newValue) {
|
||||
LinphonePreferences.instance().enableEphemeralMessages(newValue);
|
||||
if (!newValue) {
|
||||
for (ChatRoom room : LinphoneManager.getCore().getChatRooms()) {
|
||||
room.enableEphemeral(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateValues() {
|
||||
|
@ -203,9 +184,6 @@ public class ChatSettingsFragment extends SettingsFragment {
|
|||
mHideRemovedProxiesRooms.setChecked(
|
||||
LinphonePreferences.instance().hideRemovedProxiesChatRooms());
|
||||
|
||||
mEnableEphemeralBeta.setChecked(
|
||||
LinphonePreferences.instance().isEphemeralMessagesEnabled());
|
||||
|
||||
setListeners();
|
||||
}
|
||||
|
||||
|
|
|
@ -1312,14 +1312,4 @@ public class LinphonePreferences {
|
|||
if (getConfig() == null) return;
|
||||
getConfig().setBool("misc", "hide_chat_rooms_from_removed_proxies", hide);
|
||||
}
|
||||
|
||||
public void enableEphemeralMessages(boolean enable) {
|
||||
if (getConfig() == null) return;
|
||||
getConfig().setBool("app", "ephemeral", enable);
|
||||
}
|
||||
|
||||
public boolean isEphemeralMessagesEnabled() {
|
||||
if (getConfig() == null) return true;
|
||||
return getConfig().getBool("app", "ephemeral", false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,12 +60,6 @@
|
|||
linphone:title="@string/pref_android_app_hide_chat_rooms_from_removed_proxies_title"
|
||||
linphone:subtitle="@string/pref_android_app_hide_chat_rooms_from_removed_proxies_desc" />
|
||||
|
||||
<org.linphone.settings.widget.SwitchSetting
|
||||
android:id="@+id/pref_android_app_enable_ephemeral_messages_beta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
linphone:title="@string/pref_android_app_enable_ephemeral_messages_beta" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
Loading…
Reference in a new issue