1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2024-12-23 07:38:04 +01:00

コード整形

This commit is contained in:
tateisu 2022-08-11 16:56:21 +09:00
parent 4001c53cba
commit 68c3fa8ff8
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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 {