Fix / remove DebugActivity + clean

This commit is contained in:
Valere 2019-05-23 17:27:32 +02:00
parent 45ea5c356e
commit c6e428c047
2 changed files with 5 additions and 15 deletions

View file

@ -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)
}
}

View file

@ -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