mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 21:10:02 +03:00
code quality
This commit is contained in:
parent
10353c9871
commit
7187cc23a1
7 changed files with 13 additions and 10 deletions
|
@ -50,7 +50,7 @@ internal class RoomDecryptorProvider @Inject constructor(
|
||||||
Timber.e("## getRoomDecryptor() : null algorithm")
|
Timber.e("## getRoomDecryptor() : null algorithm")
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
if(roomId != null && roomId.isNotEmpty()) {
|
if (roomId != null && roomId.isNotEmpty()) {
|
||||||
synchronized(roomDecryptors) {
|
synchronized(roomDecryptors) {
|
||||||
if (!roomDecryptors.containsKey(roomId)) {
|
if (!roomDecryptors.containsKey(roomId)) {
|
||||||
roomDecryptors[roomId] = HashMap()
|
roomDecryptors[roomId] = HashMap()
|
||||||
|
|
|
@ -18,12 +18,12 @@ package im.vector.riotredesign.core.di;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
import javax.inject.Scope;
|
import javax.inject.Scope;
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
||||||
|
|
||||||
@Scope
|
@Scope
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface ScreenScope {}
|
public @interface ScreenScope {
|
||||||
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ class MessageMenuViewModel @AssistedInject constructor(@Assisted initialState: M
|
||||||
// SimpleAction(ACTION_DELETE, R.string.delete, R.drawable.ic_delete, event.root.eventId)
|
// SimpleAction(ACTION_DELETE, R.string.delete, R.drawable.ic_delete, event.root.eventId)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
ArrayList<SimpleAction>().apply {
|
arrayListOf<SimpleAction>().apply {
|
||||||
|
|
||||||
if (event.sendState == SendState.SENDING) {
|
if (event.sendState == SendState.SENDING) {
|
||||||
//TODO add cancel?
|
//TODO add cancel?
|
||||||
|
|
|
@ -46,7 +46,7 @@ class VectorInviteView @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||||
var callback: Callback? = null
|
var callback: Callback? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
if(context is HasScreenInjector){
|
if (context is HasScreenInjector){
|
||||||
context.injector().inject(this)
|
context.injector().inject(this)
|
||||||
}
|
}
|
||||||
View.inflate(context, R.layout.vector_invite_view, this)
|
View.inflate(context, R.layout.vector_invite_view, this)
|
||||||
|
|
|
@ -24,7 +24,8 @@ import im.vector.riotredesign.features.notifications.NotificationAction
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class TestBingRulesSettings @Inject constructor(private val activeSessionHolder: ActiveSessionHolder,
|
class TestBingRulesSettings @Inject constructor(private val activeSessionHolder: ActiveSessionHolder,
|
||||||
private val stringProvider: StringProvider) : TroubleshootTest(R.string.settings_troubleshoot_test_bing_settings_title) {
|
private val stringProvider: StringProvider)
|
||||||
|
: TroubleshootTest(R.string.settings_troubleshoot_test_bing_settings_title) {
|
||||||
|
|
||||||
private val testedRules =
|
private val testedRules =
|
||||||
listOf(RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME,
|
listOf(RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME,
|
||||||
|
|
|
@ -25,7 +25,8 @@ import javax.inject.Inject
|
||||||
* Checks if notifications are enable in the system settings for this app.
|
* Checks if notifications are enable in the system settings for this app.
|
||||||
*/
|
*/
|
||||||
class TestDeviceSettings @Inject constructor(private val context: AppCompatActivity,
|
class TestDeviceSettings @Inject constructor(private val context: AppCompatActivity,
|
||||||
private val stringProvider: StringProvider) : TroubleshootTest(R.string.settings_troubleshoot_test_device_settings_title) {
|
private val stringProvider: StringProvider)
|
||||||
|
: TroubleshootTest(R.string.settings_troubleshoot_test_device_settings_title) {
|
||||||
|
|
||||||
override fun perform() {
|
override fun perform() {
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ import javax.inject.Inject
|
||||||
* Checks if notifications are enable in the system settings for this app.
|
* Checks if notifications are enable in the system settings for this app.
|
||||||
*/
|
*/
|
||||||
class TestSystemSettings @Inject constructor(private val context: AppCompatActivity,
|
class TestSystemSettings @Inject constructor(private val context: AppCompatActivity,
|
||||||
private val stringProvider: StringProvider) : TroubleshootTest(R.string.settings_troubleshoot_test_system_settings_title) {
|
private val stringProvider: StringProvider)
|
||||||
|
: TroubleshootTest(R.string.settings_troubleshoot_test_system_settings_title) {
|
||||||
|
|
||||||
override fun perform() {
|
override fun perform() {
|
||||||
if (NotificationManagerCompat.from(context).areNotificationsEnabled()) {
|
if (NotificationManagerCompat.from(context).areNotificationsEnabled()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue