From c6e428c047e2454b455a4a0645af8c76330ea5a0 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 23 May 2019 17:27:32 +0200 Subject: [PATCH] Fix / remove DebugActivity + clean --- .../im/vector/riotredesign/features/DebugActivity.kt | 12 ------------ .../features/home/room/detail/RoomDetailFragment.kt | 8 +++++--- 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 vector/src/main/java/im/vector/riotredesign/features/DebugActivity.kt diff --git a/vector/src/main/java/im/vector/riotredesign/features/DebugActivity.kt b/vector/src/main/java/im/vector/riotredesign/features/DebugActivity.kt deleted file mode 100644 index 00708d03..00000000 --- a/vector/src/main/java/im/vector/riotredesign/features/DebugActivity.kt +++ /dev/null @@ -1,12 +0,0 @@ -package im.vector.riotredesign.features - -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle - -class DebugActivity : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_debug) - } -} diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/RoomDetailFragment.kt index 0ae0dda5..e34e9762 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/RoomDetailFragment.kt @@ -138,13 +138,12 @@ class RoomDetailFragment : * @return the sanitized display name */ fun sanitizeDisplayname(displayName: String): String? { - var displayName = displayName // sanity checks if (!TextUtils.isEmpty(displayName)) { val ircPattern = " (IRC)" if (displayName.endsWith(ircPattern)) { - displayName = displayName.substring(0, displayName.length - ircPattern.length) + return displayName.substring(0, displayName.length - ircPattern.length) } } @@ -202,7 +201,10 @@ class RoomDetailFragment : handleActions(it) }) - roomDetailViewModel.selectSubscribe(RoomDetailViewState::sendMode, RoomDetailViewState::selectedEvent, RoomDetailViewState::roomId) { mode, event, roomId -> + roomDetailViewModel.selectSubscribe( + RoomDetailViewState::sendMode, + RoomDetailViewState::selectedEvent, + RoomDetailViewState::roomId) { mode, event, roomId -> when (mode) { SendMode.REGULAR -> { val uid = session.sessionParams.credentials.userId