diff --git a/CHANGES.md b/CHANGES.md
index 46a83b881c..897d6cbcde 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,10 +5,10 @@ Features ✨:
-
Improvements 🙌:
- -
+ - "Add Matrix app" menu is now always visible (#1495)
Bugfix 🐛:
- -
+ - Fix dark theme issue on login screen (#1097)
Translations 🗣:
-
diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetContent.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetContent.kt
index 7e045f25c7..af70400622 100644
--- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetContent.kt
+++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetContent.kt
@@ -21,6 +21,9 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import im.vector.matrix.android.api.util.JsonDict
+/**
+ * Ref: https://github.com/matrix-org/matrix-doc/issues/1236
+ */
@JsonClass(generateAdapter = true)
data class WidgetContent(
@Json(name = "creatorUserId") val creatorUserId: String? = null,
diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetType.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetType.kt
index 4a265d71b7..a8ef77cdc3 100644
--- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetType.kt
+++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/widgets/model/WidgetType.kt
@@ -16,6 +16,9 @@
package im.vector.matrix.android.api.session.widgets.model
+/**
+ * Ref: https://github.com/matrix-org/matrix-doc/issues/1236
+ */
sealed class WidgetType(open val preferred: String, open val legacy: String = preferred) {
object Jitsi : WidgetType("m.jitsi", "jitsi")
object TradingView : WidgetType("m.tradingview")
diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt
index dbb26377f6..bf386d15a2 100644
--- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt
+++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt
@@ -159,6 +159,7 @@ import im.vector.riotx.features.permalink.NavigationInterceptor
import im.vector.riotx.features.permalink.PermalinkHandler
import im.vector.riotx.features.reactions.EmojiReactionPickerActivity
import im.vector.riotx.features.settings.VectorPreferences
+import im.vector.riotx.features.settings.VectorSettingsActivity
import im.vector.riotx.features.share.SharedData
import im.vector.riotx.features.themes.ThemeUtils
import im.vector.riotx.features.widgets.WidgetActivity
@@ -469,13 +470,28 @@ class RoomDetailFragment @Inject constructor(
true
}
R.id.open_matrix_apps -> {
- navigator.openIntegrationManager(requireContext(), roomDetailArgs.roomId, null, null)
+ if (session.integrationManagerService().isIntegrationEnabled()) {
+ navigator.openIntegrationManager(requireContext(), roomDetailArgs.roomId, null, null)
+ } else {
+ displayDisabledIntegrationDialog()
+ }
true
}
else -> super.onOptionsItemSelected(item)
}
}
+ private fun displayDisabledIntegrationDialog() {
+ AlertDialog.Builder(requireActivity())
+ .setTitle(R.string.disabled_integration_dialog_title)
+ .setMessage(R.string.disabled_integration_dialog_content)
+ .setPositiveButton(R.string.settings) { _, _ ->
+ navigator.openSettings(requireActivity(), VectorSettingsActivity.EXTRA_DIRECT_ACCESS_GENERAL)
+ }
+ .setNegativeButton(R.string.cancel, null)
+ .show()
+ }
+
private fun renderRegularMode(text: String) {
autoCompleter.exitSpecialMode()
composerLayout.collapse()
diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt
index 69a6429efb..1785151af5 100644
--- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt
+++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt
@@ -371,7 +371,7 @@ class RoomDetailViewModel @AssistedInject constructor(
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
- R.id.open_matrix_apps -> session.integrationManagerService().isIntegrationEnabled()
+ R.id.open_matrix_apps -> true
else -> false
}
diff --git a/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt
index 88f4fc2f5f..49abc9ba81 100755
--- a/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt
+++ b/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt
@@ -21,17 +21,17 @@ import android.os.Parcelable
import android.view.View
import butterknife.OnClick
import com.airbnb.mvrx.args
+import im.vector.matrix.android.internal.auth.registration.LocalizedFlowDataLoginTerms
import im.vector.riotx.R
import im.vector.riotx.core.extensions.cleanup
import im.vector.riotx.core.extensions.configureWith
import im.vector.riotx.core.extensions.toReducedUrl
-import im.vector.riotx.core.utils.openUrlInExternalBrowser
+import im.vector.riotx.core.utils.openUrlInChromeCustomTab
import im.vector.riotx.features.login.AbstractLoginFragment
import im.vector.riotx.features.login.LoginAction
import im.vector.riotx.features.login.LoginViewState
import kotlinx.android.parcel.Parcelize
import kotlinx.android.synthetic.main.fragment_login_terms.*
-import im.vector.matrix.android.internal.auth.registration.LocalizedFlowDataLoginTerms
import javax.inject.Inject
@Parcelize
@@ -95,7 +95,7 @@ class LoginTermsFragment @Inject constructor(
localizedFlowDataLoginTerms.localizedUrl
?.takeIf { it.isNotBlank() }
?.let {
- openUrlInExternalBrowser(requireContext(), it)
+ openUrlInChromeCustomTab(requireContext(), null, it)
}
}
diff --git a/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsActivity.kt b/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsActivity.kt
index 0c73c0f5d3..bbe6358bd9 100755
--- a/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsActivity.kt
+++ b/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsActivity.kt
@@ -59,6 +59,8 @@ class VectorSettingsActivity : VectorBaseActivity(),
if (isFirstCreation()) {
// display the fragment
when (intent.getIntExtra(EXTRA_DIRECT_ACCESS, EXTRA_DIRECT_ACCESS_ROOT)) {
+ EXTRA_DIRECT_ACCESS_GENERAL ->
+ replaceFragment(R.id.vector_settings_page, VectorSettingsGeneralFragment::class.java, null, FRAGMENT_TAG)
EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS ->
replaceFragment(R.id.vector_settings_page, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG)
EXTRA_DIRECT_ACCESS_SECURITY_PRIVACY ->
@@ -137,6 +139,7 @@ class VectorSettingsActivity : VectorBaseActivity(),
const val EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS = 1
const val EXTRA_DIRECT_ACCESS_SECURITY_PRIVACY = 2
const val EXTRA_DIRECT_ACCESS_SECURITY_PRIVACY_MANAGE_SESSIONS = 3
+ const val EXTRA_DIRECT_ACCESS_GENERAL = 4
private const val FRAGMENT_TAG = "VectorSettingsPreferencesFragment"
}
diff --git a/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt b/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt
index ecf5818300..0adfa049fe 100644
--- a/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt
+++ b/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt
@@ -30,7 +30,7 @@ import im.vector.riotx.core.extensions.configureWith
import im.vector.riotx.core.extensions.exhaustive
import im.vector.riotx.core.platform.VectorBaseActivity
import im.vector.riotx.core.platform.VectorBaseFragment
-import im.vector.riotx.core.utils.openUrlInExternalBrowser
+import im.vector.riotx.core.utils.openUrlInChromeCustomTab
import kotlinx.android.synthetic.main.fragment_review_terms.*
import javax.inject.Inject
@@ -106,6 +106,6 @@ class ReviewTermsFragment @Inject constructor(
}
override fun review(term: Term) {
- openUrlInExternalBrowser(requireContext(), term.url)
+ openUrlInChromeCustomTab(requireContext(), null, term.url)
}
}
diff --git a/vector/src/main/res/drawable/bg_login_server.xml b/vector/src/main/res/drawable/bg_login_server.xml
index 5aecd26292..a2ca14f02e 100644
--- a/vector/src/main/res/drawable/bg_login_server.xml
+++ b/vector/src/main/res/drawable/bg_login_server.xml
@@ -7,6 +7,6 @@
android:width="1.2dp"
android:color="#E7E7E7" />
-
+
\ No newline at end of file
diff --git a/vector/src/main/res/drawable/bg_login_server_checked.xml b/vector/src/main/res/drawable/bg_login_server_checked.xml
index 1aea622462..f120e62884 100644
--- a/vector/src/main/res/drawable/bg_login_server_checked.xml
+++ b/vector/src/main/res/drawable/bg_login_server_checked.xml
@@ -7,6 +7,6 @@
android:width="1.2dp"
android:color="@color/riotx_accent" />
-
+
\ No newline at end of file
diff --git a/vector/src/main/res/drawable/ic_airplane_16dp.xml b/vector/src/main/res/drawable/ic_airplane_16dp.xml
new file mode 100644
index 0000000000..fa2387ebf0
--- /dev/null
+++ b/vector/src/main/res/drawable/ic_airplane_16dp.xml
@@ -0,0 +1,13 @@
+
+
+
diff --git a/vector/src/main/res/layout/fragment_login.xml b/vector/src/main/res/layout/fragment_login.xml
index 894a7598c8..a35a60104d 100644
--- a/vector/src/main/res/layout/fragment_login.xml
+++ b/vector/src/main/res/layout/fragment_login.xml
@@ -25,6 +25,7 @@
android:id="@+id/loginServerIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:tint="?riotx_text_primary"
tools:src="@drawable/ic_logo_matrix_org" />
+ android:src="@drawable/ic_logo_modular"
+ android:tint="?riotx_text_primary" />
-
+ tools:visibility="visible">
+
+
+
+
\ No newline at end of file
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index 19afc120cb..931a7896eb 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -862,6 +862,9 @@
Allow integrations
Integration Manager
+ Integrations are disabled
+ "Enable 'Allow integrations' in Settings to do this."
+
User interface
Language
Choose language
diff --git a/vector/src/main/res/xml/vector_settings_general.xml b/vector/src/main/res/xml/vector_settings_general.xml
index 846380465e..7248280e37 100644
--- a/vector/src/main/res/xml/vector_settings_general.xml
+++ b/vector/src/main/res/xml/vector_settings_general.xml
@@ -68,6 +68,26 @@
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-