From 68c3fa8ff8cb9bee6fe1c1a59aa42148ce1d9a55 Mon Sep 17 00:00:00 2001 From: tateisu Date: Thu, 11 Aug 2022 16:56:21 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E6=95=B4=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jp/juggler/subwaytooter/ActHighlightWordEdit.kt | 1 - .../jp/juggler/subwaytooter/util/AttachmentPicker.kt | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/jp/juggler/subwaytooter/ActHighlightWordEdit.kt b/app/src/main/java/jp/juggler/subwaytooter/ActHighlightWordEdit.kt index 915aa542..21739f44 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/ActHighlightWordEdit.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/ActHighlightWordEdit.kt @@ -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 diff --git a/app/src/main/java/jp/juggler/subwaytooter/util/AttachmentPicker.kt b/app/src/main/java/jp/juggler/subwaytooter/util/AttachmentPicker.kt index 010f86f9..e2790c55 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/util/AttachmentPicker.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/util/AttachmentPicker.kt @@ -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 {