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

Update app version

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