File tree Expand file tree Collapse file tree 3 files changed +12
-17
lines changed
WordPress/src/main/java/org/wordpress/android/ui/postsrs Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ class PostRsSettingsActivity : BaseAppCompatActivity() {
162162 MediaPickerConstants .EXTRA_MEDIA_URIS
163163 )
164164 val uri = uris?.firstOrNull()
165- ?.let { it. toUri() }
165+ ?.toUri()
166166 if (uri != null ) {
167167 viewModel.onFeaturedImagePickedFromDevice(
168168 uri
Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ class PostRsSettingsViewModel @Inject constructor(
560560 ): Long {
561561 val client = apiClient
562562 ? : throw PostApiRequestException (
563- " No API client "
563+ " No site selected "
564564 )
565565 val response = client.request { requestBuilder ->
566566 requestBuilder.media().create(
Original file line number Diff line number Diff line change @@ -593,8 +593,8 @@ private fun HeroImagePlaceholder(
593593 text : String = stringResource(
594594 R .string.post_rs_settings_featured_image_not_set
595595 ),
596- onChooseFromWpMedia : (( ) -> Unit ) ? = null ,
597- onChooseFromDevice : (( ) -> Unit ) ? = null ,
596+ onChooseFromWpMedia : () -> Unit ,
597+ onChooseFromDevice : () -> Unit ,
598598) {
599599 Box (
600600 modifier = Modifier
@@ -611,19 +611,14 @@ private fun HeroImagePlaceholder(
611611 .onSurfaceVariant,
612612 modifier = Modifier .align(Alignment .Center )
613613 )
614- if (
615- onChooseFromWpMedia != null &&
616- onChooseFromDevice != null
617- ) {
618- FeaturedImageEditButton (
619- hasImage = false ,
620- onChooseFromWpMedia = onChooseFromWpMedia,
621- onChooseFromDevice = onChooseFromDevice,
622- modifier = Modifier
623- .align(Alignment .BottomEnd )
624- .padding(12 .dp)
625- )
626- }
614+ FeaturedImageEditButton (
615+ hasImage = false ,
616+ onChooseFromWpMedia = onChooseFromWpMedia,
617+ onChooseFromDevice = onChooseFromDevice,
618+ modifier = Modifier
619+ .align(Alignment .BottomEnd )
620+ .padding(12 .dp)
621+ )
627622 }
628623}
629624
You can’t perform that action at this time.
0 commit comments