mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +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)
|
||||
- Do not upload file too big for the homeserver (#587)
|
||||
- Handle read markers (#84)
|
||||
- Attachments: start using system pickers
|
||||
|
||||
Other changes:
|
||||
- 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 height = measuredHeight
|
||||
return width to height
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,4 +20,4 @@ class KeyboardStateUtils(activity: Activity) : ViewTreeObserver.OnGlobalLayoutLi
|
|||
val keypadHeight = screenHeight - rect.bottom
|
||||
isKeyboardShowing = keypadHeight > screenHeight * 0.15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,6 @@ class AttachmentTypeSelectorView(context: Context,
|
|||
button.startAnimation(animation)
|
||||
}
|
||||
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private fun animateWindowInCircular(anchor: View?, contentView: View) {
|
||||
val coordinates = getClickCoordinates(anchor, contentView)
|
||||
|
@ -216,7 +215,6 @@ class AttachmentTypeSelectorView(context: Context,
|
|||
dismiss()
|
||||
callback?.onTypeSelected(type)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -230,8 +228,5 @@ class AttachmentTypeSelectorView(context: Context,
|
|||
STICKER(PERMISSIONS_EMPTY),
|
||||
AUDIO(PERMISSIONS_FOR_WRITING_FILES),
|
||||
CONTACT(PERMISSIONS_FOR_PICKING_CONTACT)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -186,5 +186,4 @@ class AttachmentsHelper private constructor(private val pickerManagerFactory: Pi
|
|||
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.VideoPickerCallback
|
||||
import com.kbeanie.multipicker.api.entity.*
|
||||
import timber.log.Timber
|
||||
|
||||
/**
|
||||
* 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?) {
|
||||
callback.onAttachmentsProcessFailed()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,5 +28,4 @@ data class ContactAttachment(
|
|||
stringBuilder.append(last())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ interface PickerManagerFactory {
|
|||
fun createAudioPicker(): AudioPicker
|
||||
|
||||
fun createContactPicker(): ContactPicker
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ import kotlinx.android.synthetic.main.merge_overlay_waiting_view.*
|
|||
import org.commonmark.parser.Parser
|
||||
import timber.log.Timber
|
||||
import java.io.File
|
||||
import java.security.Key
|
||||
import javax.inject.Inject
|
||||
|
||||
@Parcelize
|
||||
|
@ -127,7 +126,6 @@ data class RoomDetailArgs(
|
|||
val sharedData: SharedData? = null
|
||||
) : Parcelable
|
||||
|
||||
|
||||
private const val REACTION_SELECT_REQUEST_CODE = 0
|
||||
|
||||
class RoomDetailFragment :
|
||||
|
@ -207,7 +205,6 @@ class RoomDetailFragment :
|
|||
|
||||
private var lockSendButton = false
|
||||
|
||||
|
||||
override fun injectWith(injector: ScreenComponent) {
|
||||
injector.inject(this)
|
||||
}
|
||||
|
@ -284,7 +281,6 @@ class RoomDetailFragment :
|
|||
null -> Timber.v("No share data to process")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -441,14 +437,13 @@ class RoomDetailFragment :
|
|||
?: return
|
||||
val reaction = data.getStringExtra(EmojiReactionPickerActivity.EXTRA_REACTION_RESULT)
|
||||
?: return
|
||||
//TODO check if already reacted with that?
|
||||
// TODO check if already reacted with that?
|
||||
roomDetailViewModel.process(RoomDetailActions.SendReaction(reaction, eventId))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PRIVATE METHODS *****************************************************************************
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
|
|
|
@ -19,7 +19,6 @@ package im.vector.riotx.features.navigation
|
|||
import android.app.Activity
|
||||
import android.content.Context
|
||||
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.riotx.R
|
||||
import im.vector.riotx.core.platform.VectorBaseActivity
|
||||
|
|
|
@ -18,7 +18,6 @@ package im.vector.riotx.features.navigation
|
|||
|
||||
import android.app.Activity
|
||||
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.riotx.features.share.SharedData
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ import im.vector.riotx.features.login.LoginActivity
|
|||
import kotlinx.android.synthetic.main.activity_incoming_share.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
class IncomingShareActivity :
|
||||
VectorBaseActivity(), AttachmentsHelper.Callback {
|
||||
|
||||
|
@ -97,4 +96,4 @@ class IncomingShareActivity :
|
|||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,5 +27,4 @@ sealed class SharedData: Parcelable {
|
|||
|
||||
@Parcelize
|
||||
data class Attachments(val attachmentData: List<ContentAttachmentData>): SharedData()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue