mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 04:50:08 +03:00
Use klint and update CHANGES
This commit is contained in:
parent
13a5f784dc
commit
679b0fff98
13 changed files with 9 additions and 29 deletions
|
@ -8,6 +8,7 @@ Improvements:
|
||||||
- Persist active tab between sessions (#503)
|
- Persist active tab between sessions (#503)
|
||||||
- Do not upload file too big for the homeserver (#587)
|
- Do not upload file too big for the homeserver (#587)
|
||||||
- Handle read markers (#84)
|
- Handle read markers (#84)
|
||||||
|
- Attachments: start using system pickers
|
||||||
|
|
||||||
Other changes:
|
Other changes:
|
||||||
- Accessibility improvements to read receipts in the room timeline and reactions emoji chooser
|
- Accessibility improvements to read receipts in the room timeline and reactions emoji chooser
|
||||||
|
|
|
@ -54,4 +54,4 @@ fun View.getMeasurements(): Pair<Int, Int> {
|
||||||
val width = measuredWidth
|
val width = measuredWidth
|
||||||
val height = measuredHeight
|
val height = measuredHeight
|
||||||
return width to height
|
return width to height
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,4 @@ class KeyboardStateUtils(activity: Activity) : ViewTreeObserver.OnGlobalLayoutLi
|
||||||
val keypadHeight = screenHeight - rect.bottom
|
val keypadHeight = screenHeight - rect.bottom
|
||||||
isKeyboardShowing = keypadHeight > screenHeight * 0.15
|
isKeyboardShowing = keypadHeight > screenHeight * 0.15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,6 @@ class AttachmentTypeSelectorView(context: Context,
|
||||||
button.startAnimation(animation)
|
button.startAnimation(animation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||||
private fun animateWindowInCircular(anchor: View?, contentView: View) {
|
private fun animateWindowInCircular(anchor: View?, contentView: View) {
|
||||||
val coordinates = getClickCoordinates(anchor, contentView)
|
val coordinates = getClickCoordinates(anchor, contentView)
|
||||||
|
@ -216,7 +215,6 @@ class AttachmentTypeSelectorView(context: Context,
|
||||||
dismiss()
|
dismiss()
|
||||||
callback?.onTypeSelected(type)
|
callback?.onTypeSelected(type)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -230,8 +228,5 @@ class AttachmentTypeSelectorView(context: Context,
|
||||||
STICKER(PERMISSIONS_EMPTY),
|
STICKER(PERMISSIONS_EMPTY),
|
||||||
AUDIO(PERMISSIONS_FOR_WRITING_FILES),
|
AUDIO(PERMISSIONS_FOR_WRITING_FILES),
|
||||||
CONTACT(PERMISSIONS_FOR_PICKING_CONTACT)
|
CONTACT(PERMISSIONS_FOR_PICKING_CONTACT)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,5 +186,4 @@ class AttachmentsHelper private constructor(private val pickerManagerFactory: Pi
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ import com.kbeanie.multipicker.api.callbacks.FilePickerCallback
|
||||||
import com.kbeanie.multipicker.api.callbacks.ImagePickerCallback
|
import com.kbeanie.multipicker.api.callbacks.ImagePickerCallback
|
||||||
import com.kbeanie.multipicker.api.callbacks.VideoPickerCallback
|
import com.kbeanie.multipicker.api.callbacks.VideoPickerCallback
|
||||||
import com.kbeanie.multipicker.api.entity.*
|
import com.kbeanie.multipicker.api.entity.*
|
||||||
import timber.log.Timber
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class delegates the PickerManager callbacks to an [AttachmentsHelper.Callback]
|
* This class delegates the PickerManager callbacks to an [AttachmentsHelper.Callback]
|
||||||
|
@ -85,5 +84,4 @@ class AttachmentsPickerCallback(private val callback: AttachmentsHelper.Callback
|
||||||
override fun onError(error: String?) {
|
override fun onError(error: String?) {
|
||||||
callback.onAttachmentsProcessFailed()
|
callback.onAttachmentsProcessFailed()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -28,5 +28,4 @@ data class ContactAttachment(
|
||||||
stringBuilder.append(last())
|
stringBuilder.append(last())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ interface PickerManagerFactory {
|
||||||
fun createAudioPicker(): AudioPicker
|
fun createAudioPicker(): AudioPicker
|
||||||
|
|
||||||
fun createContactPicker(): ContactPicker
|
fun createContactPicker(): ContactPicker
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActivityPickerManagerFactory(private val activity: Activity, callback: AttachmentsHelper.Callback) : PickerManagerFactory {
|
class ActivityPickerManagerFactory(private val activity: Activity, callback: AttachmentsHelper.Callback) : PickerManagerFactory {
|
||||||
|
@ -132,6 +131,4 @@ class FragmentPickerManagerFactory(private val fragment: Fragment, callback: Att
|
||||||
it.setContactPickerCallback(attachmentsPickerCallback)
|
it.setContactPickerCallback(attachmentsPickerCallback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,6 @@ import kotlinx.android.synthetic.main.merge_overlay_waiting_view.*
|
||||||
import org.commonmark.parser.Parser
|
import org.commonmark.parser.Parser
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.security.Key
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
|
@ -127,7 +126,6 @@ data class RoomDetailArgs(
|
||||||
val sharedData: SharedData? = null
|
val sharedData: SharedData? = null
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
|
|
||||||
private const val REACTION_SELECT_REQUEST_CODE = 0
|
private const val REACTION_SELECT_REQUEST_CODE = 0
|
||||||
|
|
||||||
class RoomDetailFragment :
|
class RoomDetailFragment :
|
||||||
|
@ -207,7 +205,6 @@ class RoomDetailFragment :
|
||||||
|
|
||||||
private var lockSendButton = false
|
private var lockSendButton = false
|
||||||
|
|
||||||
|
|
||||||
override fun injectWith(injector: ScreenComponent) {
|
override fun injectWith(injector: ScreenComponent) {
|
||||||
injector.inject(this)
|
injector.inject(this)
|
||||||
}
|
}
|
||||||
|
@ -284,7 +281,6 @@ class RoomDetailFragment :
|
||||||
null -> Timber.v("No share data to process")
|
null -> Timber.v("No share data to process")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
@ -441,14 +437,13 @@ class RoomDetailFragment :
|
||||||
?: return
|
?: return
|
||||||
val reaction = data.getStringExtra(EmojiReactionPickerActivity.EXTRA_REACTION_RESULT)
|
val reaction = data.getStringExtra(EmojiReactionPickerActivity.EXTRA_REACTION_RESULT)
|
||||||
?: return
|
?: return
|
||||||
//TODO check if already reacted with that?
|
// TODO check if already reacted with that?
|
||||||
roomDetailViewModel.process(RoomDetailActions.SendReaction(reaction, eventId))
|
roomDetailViewModel.process(RoomDetailActions.SendReaction(reaction, eventId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PRIVATE METHODS *****************************************************************************
|
// PRIVATE METHODS *****************************************************************************
|
||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
|
|
|
@ -19,7 +19,6 @@ package im.vector.riotx.features.navigation
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import im.vector.matrix.android.api.session.content.ContentAttachmentData
|
|
||||||
import im.vector.matrix.android.api.session.room.model.roomdirectory.PublicRoom
|
import im.vector.matrix.android.api.session.room.model.roomdirectory.PublicRoom
|
||||||
import im.vector.riotx.R
|
import im.vector.riotx.R
|
||||||
import im.vector.riotx.core.platform.VectorBaseActivity
|
import im.vector.riotx.core.platform.VectorBaseActivity
|
||||||
|
|
|
@ -18,7 +18,6 @@ package im.vector.riotx.features.navigation
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import im.vector.matrix.android.api.session.content.ContentAttachmentData
|
|
||||||
import im.vector.matrix.android.api.session.room.model.roomdirectory.PublicRoom
|
import im.vector.matrix.android.api.session.room.model.roomdirectory.PublicRoom
|
||||||
import im.vector.riotx.features.share.SharedData
|
import im.vector.riotx.features.share.SharedData
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ import im.vector.riotx.features.login.LoginActivity
|
||||||
import kotlinx.android.synthetic.main.activity_incoming_share.*
|
import kotlinx.android.synthetic.main.activity_incoming_share.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
||||||
class IncomingShareActivity :
|
class IncomingShareActivity :
|
||||||
VectorBaseActivity(), AttachmentsHelper.Callback {
|
VectorBaseActivity(), AttachmentsHelper.Callback {
|
||||||
|
|
||||||
|
@ -97,4 +96,4 @@ class IncomingShareActivity :
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,5 +27,4 @@ sealed class SharedData: Parcelable {
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
data class Attachments(val attachmentData: List<ContentAttachmentData>): SharedData()
|
data class Attachments(val attachmentData: List<ContentAttachmentData>): SharedData()
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue