mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
resolve some lint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
b50501a38f
commit
d7bc01e954
@ -160,7 +160,7 @@ class MagicIncomingTextMessageViewHolder(incomingView: View) : MessageHolders
|
|||||||
|
|
||||||
val resources = itemView.resources
|
val resources = itemView.resources
|
||||||
|
|
||||||
val bg_bubble_color = if (message.isDeleted) {
|
val bgBubbleColor = if (message.isDeleted) {
|
||||||
resources.getColor(R.color.bg_message_list_incoming_bubble_deleted)
|
resources.getColor(R.color.bg_message_list_incoming_bubble_deleted)
|
||||||
} else {
|
} else {
|
||||||
resources.getColor(R.color.bg_message_list_incoming_bubble)
|
resources.getColor(R.color.bg_message_list_incoming_bubble)
|
||||||
@ -173,9 +173,9 @@ class MagicIncomingTextMessageViewHolder(incomingView: View) : MessageHolders
|
|||||||
}
|
}
|
||||||
|
|
||||||
val bubbleDrawable = DisplayUtils.getMessageSelector(
|
val bubbleDrawable = DisplayUtils.getMessageSelector(
|
||||||
bg_bubble_color,
|
bgBubbleColor,
|
||||||
resources.getColor(R.color.transparent),
|
resources.getColor(R.color.transparent),
|
||||||
bg_bubble_color, bubbleResource
|
bgBubbleColor, bubbleResource
|
||||||
)
|
)
|
||||||
ViewCompat.setBackground(bubble, bubbleDrawable)
|
ViewCompat.setBackground(bubble, bubbleDrawable)
|
||||||
|
|
||||||
|
@ -136,23 +136,23 @@ class MagicOutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessage
|
|||||||
realView.isSelected = true
|
realView.isSelected = true
|
||||||
}
|
}
|
||||||
val resources = sharedApplication!!.resources
|
val resources = sharedApplication!!.resources
|
||||||
val bg_bubble_color = if (message.isDeleted) {
|
val bgBubbleColor = if (message.isDeleted) {
|
||||||
resources.getColor(R.color.bg_message_list_outcoming_bubble_deleted)
|
resources.getColor(R.color.bg_message_list_outcoming_bubble_deleted)
|
||||||
} else {
|
} else {
|
||||||
resources.getColor(R.color.bg_message_list_outcoming_bubble)
|
resources.getColor(R.color.bg_message_list_outcoming_bubble)
|
||||||
}
|
}
|
||||||
if (message.isGrouped) {
|
if (message.isGrouped) {
|
||||||
val bubbleDrawable = getMessageSelector(
|
val bubbleDrawable = getMessageSelector(
|
||||||
bg_bubble_color,
|
bgBubbleColor,
|
||||||
resources.getColor(R.color.transparent),
|
resources.getColor(R.color.transparent),
|
||||||
bg_bubble_color,
|
bgBubbleColor,
|
||||||
R.drawable.shape_grouped_outcoming_message)
|
R.drawable.shape_grouped_outcoming_message)
|
||||||
ViewCompat.setBackground(bubble, bubbleDrawable)
|
ViewCompat.setBackground(bubble, bubbleDrawable)
|
||||||
} else {
|
} else {
|
||||||
val bubbleDrawable = getMessageSelector(
|
val bubbleDrawable = getMessageSelector(
|
||||||
bg_bubble_color,
|
bgBubbleColor,
|
||||||
resources.getColor(R.color.transparent),
|
resources.getColor(R.color.transparent),
|
||||||
bg_bubble_color,
|
bgBubbleColor,
|
||||||
R.drawable.shape_outcoming_message)
|
R.drawable.shape_outcoming_message)
|
||||||
ViewCompat.setBackground(bubble, bubbleDrawable)
|
ViewCompat.setBackground(bubble, bubbleDrawable)
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ class ChatController(args: Bundle) : BaseController(args), MessagesListAdapter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getTitle(): String? {
|
override fun getTitle(): String {
|
||||||
currentConversation?.displayName?.let {
|
currentConversation?.displayName?.let {
|
||||||
return EmojiCompat.get().process(it as CharSequence).toString()
|
return EmojiCompat.get().process(it as CharSequence).toString()
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,9 @@ abstract class ButterKnifeController : Controller {
|
|||||||
|
|
||||||
private var unbinder: Unbinder? = null
|
private var unbinder: Unbinder? = null
|
||||||
|
|
||||||
constructor() {}
|
constructor()
|
||||||
|
|
||||||
constructor(args: Bundle) : super(args) {}
|
constructor(args: Bundle) : super(args)
|
||||||
|
|
||||||
protected abstract fun inflateView(inflater: LayoutInflater, container: ViewGroup): View
|
protected abstract fun inflateView(inflater: LayoutInflater, container: ViewGroup): View
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class UploadAndShareFilesWorker(val context: Context, workerParameters: WorkerPa
|
|||||||
WorkManager.getInstance().enqueue(shareWorker)
|
WorkManager.getInstance().enqueue(shareWorker)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getFileName(uri: Uri): String? {
|
private fun getFileName(uri: Uri): String {
|
||||||
var filename: String? = null
|
var filename: String? = null
|
||||||
if (uri.scheme == "content") {
|
if (uri.scheme == "content") {
|
||||||
val cursor: Cursor? = context.contentResolver.query(uri, null, null, null, null)
|
val cursor: Cursor? = context.contentResolver.query(uri, null, null, null, null)
|
||||||
|
@ -46,16 +46,16 @@ class AttachmentDialog(val activity: Activity, var chatController :ChatControlle
|
|||||||
private var unbinder: Unbinder? = null
|
private var unbinder: Unbinder? = null
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState)
|
||||||
val view = layoutInflater.inflate(R.layout.dialog_attachment, null);
|
val view = layoutInflater.inflate(R.layout.dialog_attachment, null)
|
||||||
setContentView(view);
|
setContentView(view)
|
||||||
|
|
||||||
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
|
|
||||||
unbinder = ButterKnife.bind(this, view);
|
unbinder = ButterKnife.bind(this, view)
|
||||||
|
|
||||||
attachFromLocal?.setOnClickListener {
|
attachFromLocal?.setOnClickListener {
|
||||||
chatController.sendSelectLocalFileIntent();
|
chatController.sendSelectLocalFileIntent()
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
attachFromCloud?.setOnClickListener {
|
attachFromCloud?.setOnClickListener {
|
||||||
|
@ -43,7 +43,7 @@ object NotificationUtils {
|
|||||||
val NOTIFICATION_CHANNEL_MESSAGES_V3 = "NOTIFICATION_CHANNEL_MESSAGES_V3"
|
val NOTIFICATION_CHANNEL_MESSAGES_V3 = "NOTIFICATION_CHANNEL_MESSAGES_V3"
|
||||||
val NOTIFICATION_CHANNEL_CALLS_V3 = "NOTIFICATION_CHANNEL_CALLS_V3"
|
val NOTIFICATION_CHANNEL_CALLS_V3 = "NOTIFICATION_CHANNEL_CALLS_V3"
|
||||||
|
|
||||||
fun getVibrationEffectForCalls(): LongArray? {
|
fun getVibrationEffectForCalls(): LongArray {
|
||||||
return longArrayOf(0L, 400L, 800L, 600L, 800L, 800L, 800L, 1000L)
|
return longArrayOf(0L, 400L, 800L, 600L, 800L, 800L, 800L, 1000L)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@
|
|||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_alignSelf="center"
|
app:layout_alignSelf="center"
|
||||||
tools:text="16:08" />
|
tools:text="16:08" />
|
||||||
/>
|
|
||||||
|
|
||||||
</com.google.android.flexbox.FlexboxLayout>
|
</com.google.android.flexbox.FlexboxLayout>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user