Commit 142b6c41 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update app version

parent 3e7ee4e0
...@@ -18,7 +18,7 @@ android { ...@@ -18,7 +18,7 @@ android {
applicationId "chat.rocket.android" applicationId "chat.rocket.android"
minSdkVersion versions.minSdk minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk targetSdkVersion versions.targetSdk
versionCode 2061 versionCode 2064
versionName "3.3.1" versionName "3.3.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
......
...@@ -60,17 +60,12 @@ private const val BUNDLE_IS_FAVORITE = "BUNDLE_IS_FAVORITE" ...@@ -60,17 +60,12 @@ private const val BUNDLE_IS_FAVORITE = "BUNDLE_IS_FAVORITE"
private const val BUNDLE_DISABLE_MENU = "BUNDLE_DISABLE_MENU" private const val BUNDLE_DISABLE_MENU = "BUNDLE_DISABLE_MENU"
class ChatDetailsFragment : Fragment(), ChatDetailsView { class ChatDetailsFragment : Fragment(), ChatDetailsView {
@Inject @Inject lateinit var presenter: ChatDetailsPresenter
lateinit var presenter: ChatDetailsPresenter @Inject lateinit var factory: ChatDetailsViewModelFactory
@Inject @Inject lateinit var serverUrl: CurrentServerRepository
lateinit var factory: ChatDetailsViewModelFactory @Inject lateinit var settings: GetSettingsInteractor
@Inject
lateinit var serverUrl: CurrentServerRepository
@Inject
lateinit var settings: GetSettingsInteractor
private var adapter: ChatDetailsAdapter? = null private var adapter: ChatDetailsAdapter? = null
private lateinit var viewModel: ChatDetailsViewModel private lateinit var viewModel: ChatDetailsViewModel
internal lateinit var chatRoomId: String internal lateinit var chatRoomId: String
internal lateinit var chatRoomType: String internal lateinit var chatRoomType: String
private var isSubscribed: Boolean = true private var isSubscribed: Boolean = true
...@@ -154,19 +149,19 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView { ...@@ -154,19 +149,19 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView {
adapter?.let { adapter?.let {
if (!disableMenu) { if (!disableMenu) {
it.addOption(getString(R.string.title_files), R.drawable.ic_files_24dp) { it.addOption(getString(R.string.title_files), R.drawable.ic_files_24dp) {
presenter.toFiles(chatRoomId!!) presenter.toFiles(chatRoomId)
} }
} }
if (chatRoomType != RoomType.DIRECT_MESSAGE && !disableMenu) { if (chatRoomType != RoomType.DIRECT_MESSAGE && !disableMenu) {
it.addOption(getString(R.string.msg_mentions), R.drawable.ic_at_black_20dp) { it.addOption(getString(R.string.msg_mentions), R.drawable.ic_at_black_20dp) {
presenter.toMentions(chatRoomId!!) presenter.toMentions(chatRoomId)
} }
it.addOption( it.addOption(
getString(R.string.title_members), getString(R.string.title_members),
R.drawable.ic_people_outline_black_24dp R.drawable.ic_people_outline_black_24dp
) { ) {
presenter.toMembers(chatRoomId!!) presenter.toMembers(chatRoomId)
} }
} }
...@@ -174,13 +169,13 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView { ...@@ -174,13 +169,13 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView {
getString(R.string.title_favorite_messages), getString(R.string.title_favorite_messages),
R.drawable.ic_star_border_white_24dp R.drawable.ic_star_border_white_24dp
) { ) {
presenter.toFavorites(chatRoomId!!) presenter.toFavorites(chatRoomId)
} }
it.addOption( it.addOption(
getString(R.string.title_pinned_messages), getString(R.string.title_pinned_messages),
R.drawable.ic_action_message_pin_24dp R.drawable.ic_action_message_pin_24dp
) { ) {
presenter.toPinned(chatRoomId!!) presenter.toPinned(chatRoomId)
} }
} }
} }
...@@ -206,11 +201,11 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView { ...@@ -206,11 +201,11 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView {
private fun getDetails() { private fun getDetails() {
if (isSubscribed) if (isSubscribed)
viewModel.getDetails(chatRoomId!!).observe(viewLifecycleOwner, Observer { details -> viewModel.getDetails(chatRoomId).observe(viewLifecycleOwner, Observer { details ->
displayDetails(details) displayDetails(details)
}) })
else else
presenter.getDetails(chatRoomId!!, chatRoomType!!) presenter.getDetails(chatRoomId, chatRoomType)
} }
private fun setupOptions() { private fun setupOptions() {
......
...@@ -34,10 +34,8 @@ internal const val TAG_MESSAGE_INFO_FRAGMENT = "MessageInfoFragment" ...@@ -34,10 +34,8 @@ internal const val TAG_MESSAGE_INFO_FRAGMENT = "MessageInfoFragment"
private const val BUNDLE_MESSAGE_ID = "message_id" private const val BUNDLE_MESSAGE_ID = "message_id"
class MessageInfoFragment : Fragment(), MessageInfoView { class MessageInfoFragment : Fragment(), MessageInfoView {
@Inject @Inject lateinit var presenter: MessageInfoPresenter
lateinit var presenter: MessageInfoPresenter @Inject lateinit var analyticsManager: AnalyticsManager
@Inject
lateinit var analyticsManager: AnalyticsManager
private lateinit var adapter: ReadReceiptAdapter private lateinit var adapter: ReadReceiptAdapter
private lateinit var messageId: String private lateinit var messageId: String
......
...@@ -401,7 +401,7 @@ class UiModelMapper @Inject constructor( ...@@ -401,7 +401,7 @@ class UiModelMapper @Inject constructor(
private fun attachmentUrl(url: String?): String? { private fun attachmentUrl(url: String?): String? {
if (url.isNullOrEmpty()) return null if (url.isNullOrEmpty()) return null
if (url!!.startsWith("http")) return url if (url.startsWith("http")) return url
val fullUrl = "$baseUrl$url" val fullUrl = "$baseUrl$url"
val httpUrl = HttpUrl.parse(fullUrl) val httpUrl = HttpUrl.parse(fullUrl)
......
...@@ -116,7 +116,7 @@ fun PublicSettings.messageReadReceiptStoreUsers(): Boolean = this[MESSAGE_READ_R ...@@ -116,7 +116,7 @@ fun PublicSettings.messageReadReceiptStoreUsers(): Boolean = this[MESSAGE_READ_R
fun PublicSettings.uploadMimeTypeFilter(): Array<String>? { fun PublicSettings.uploadMimeTypeFilter(): Array<String>? {
val values = this[UPLOAD_WHITELIST_MIMETYPES]?.value as String? val values = this[UPLOAD_WHITELIST_MIMETYPES]?.value as String?
if (!values.isNullOrBlank()) { if (!values.isNullOrBlank()) {
return values!!.split(",").mapToTypedArray { it.trim() } return values.split(",").mapToTypedArray { it.trim() }
} }
return null return null
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment