mirror of
https://github.com/tateisu/SubwayTooter
synced 2024-12-23 07:38:04 +01:00
コード整形
This commit is contained in:
parent
4001c53cba
commit
68c3fa8ff8
@ -5,7 +5,6 @@ import android.app.AlertDialog
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.media.RingtoneManager
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
|
@ -27,8 +27,8 @@ class AttachmentPicker(
|
||||
// callback after media selected
|
||||
interface Callback {
|
||||
fun onPickAttachment(uri: Uri, mimeType: String? = null)
|
||||
fun onPickCustomThumbnail(pa:PostAttachment,src: GetContentResultEntry)
|
||||
fun resumeCustomThumbnailTarget(id:String?): PostAttachment?
|
||||
fun onPickCustomThumbnail(pa: PostAttachment, src: GetContentResultEntry)
|
||||
fun resumeCustomThumbnailTarget(id: String?): PostAttachment?
|
||||
}
|
||||
|
||||
// actions after permission granted
|
||||
@ -80,11 +80,10 @@ class AttachmentPicker(
|
||||
?.handleGetContentResult(activity.contentResolver)
|
||||
?.firstOrNull()
|
||||
?.let {
|
||||
callback.resumeCustomThumbnailTarget(states.customThumbnailTargetId)?.let { pa->
|
||||
callback.onPickCustomThumbnail(pa,it)
|
||||
callback.resumeCustomThumbnailTarget(states.customThumbnailTargetId)?.let { pa ->
|
||||
callback.onPickCustomThumbnail(pa, it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private val prPickAttachment = PermissionRequester(
|
||||
@ -97,7 +96,7 @@ class AttachmentPicker(
|
||||
deniedId = R.string.missing_permission_to_access_media,
|
||||
) {
|
||||
callback.resumeCustomThumbnailTarget(states.customThumbnailTargetId)
|
||||
?.let{ openCustomThumbnail(it) }
|
||||
?.let { openCustomThumbnail(it) }
|
||||
}
|
||||
|
||||
init {
|
||||
|
Loading…
Reference in New Issue
Block a user