Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ repositories {
includeGroup "org.wordpress.gutenberg-mobile"
includeGroupByRegex "org.wordpress.react-native-libraries.*"
includeGroup "com.automattic"
includeGroup "com.automattic.stories"
includeGroup "com.automattic.tracks"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ fun PreviewDrawButton() {
Color.Gray,
shape = RoundedCornerShape(6.dp)
),
drawableLeft = Drawable(R.drawable.ic_story_icon_24dp),
drawableRight = Drawable(R.drawable.ic_story_icon_24dp),
drawableTop = Drawable(R.drawable.ic_story_icon_24dp),
drawableBottom = Drawable(R.drawable.ic_story_icon_24dp),
drawableLeft = Drawable(R.drawable.ic_pages_white_24dp),
drawableRight = Drawable(R.drawable.ic_pages_white_24dp),
drawableTop = Drawable(R.drawable.ic_pages_white_24dp),
drawableBottom = Drawable(R.drawable.ic_pages_white_24dp),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think any random icon would fit the purposes of the preview

button = Button(text = UiString.UiStringText("Button Text")),
onClick = {}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ fun MySiteListItemPreviewWithSecondaryImage() {
MenuItemState.MenuListItem(
primaryIcon = R.drawable.ic_posts_white_24dp,
primaryText = UiString.UiStringText("Plans"),
secondaryIcon = R.drawable.ic_story_icon_24dp,
secondaryIcon = R.drawable.ic_pages_white_24dp,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secondaryText = null,
showFocusPoint = false,
onClick = ListItemInteraction.create { onClick() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ class PhotoPickerFragment : Fragment(R.layout.photo_picker_fragment) {
) {
isShowingActionMode = false
}
setupFab(uiState.fabUiModel)
setupPartialAccessPrompt(uiState.isPartialMediaAccessPromptVisible)
}
}
Expand Down Expand Up @@ -255,18 +254,6 @@ class PhotoPickerFragment : Fragment(R.layout.photo_picker_fragment) {
}
}

@Suppress("DEPRECATION")
private fun PhotoPickerFragmentBinding.setupFab(fabUiModel: PhotoPickerViewModel.FabUiModel) {
if (fabUiModel.show) {
wpStoriesTakePicture.visibility = View.VISIBLE
wpStoriesTakePicture.setOnClickListener {
fabUiModel.action()
}
} else {
wpStoriesTakePicture.visibility = View.GONE
}
}

private fun PhotoPickerFragmentBinding.setupPartialAccessPrompt(isVisible: Boolean) {
partialMediaAccessPrompt.root.isVisible = isVisible
partialMediaAccessPrompt.partialAccessPromptSelectMoreButton.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ class PhotoPickerViewModel @Inject constructor(
softAskRequest?.show == true,
),
buildSoftAskView(softAskRequest),
FabUiModel(selectedIds.isNullOrEmpty()) {
clickIcon(PhotoPickerFragment.PhotoPickerIcon.ANDROID_CAPTURE_PHOTO)
},
buildActionModeUiModel(selectedIds),
progressDialogModel ?: ProgressDialogUiModel.Hidden,
showPartialAccessPrompt ?: false,
Expand Down Expand Up @@ -406,7 +403,6 @@ class PhotoPickerViewModel @Inject constructor(
items.add(PopupMenuUiModel.PopupMenuItem(UiStringRes(R.string.photo_picker_stock_media)) {
clickIcon(PhotoPickerFragment.PhotoPickerIcon.STOCK_MEDIA)
})
// only show GIF picker from Tenor if this is NOT the WPStories picker
items.add(PopupMenuUiModel.PopupMenuItem(UiStringRes(R.string.photo_picker_gif)) {
clickIcon(PhotoPickerFragment.PhotoPickerIcon.GIF)
})
Expand Down Expand Up @@ -527,7 +523,6 @@ class PhotoPickerViewModel @Inject constructor(
val photoListUiModel: PhotoListUiModel,
val bottomBarUiModel: BottomBarUiModel,
val softAskViewUiModel: SoftAskViewUiModel,
val fabUiModel: FabUiModel,
val actionModeUiModel: ActionModeUiModel,
val progressDialogUiModel: ProgressDialogUiModel,
val isPartialMediaAccessPromptVisible: Boolean,
Expand Down Expand Up @@ -564,8 +559,6 @@ class PhotoPickerViewModel @Inject constructor(
object Hidden : SoftAskViewUiModel()
}

data class FabUiModel(val show: Boolean, val action: () -> Unit)

sealed class ActionModeUiModel {
data class Visible(
val actionModeTitle: UiString? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeItemUi
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeItemUiState.HeaderUiState
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeItemUiState.HomeUiState
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeItemUiState.SocialUiState
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeItemUiState.StoryTitleUiState
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeViewHolder.PrepublishingHeaderListItemViewHolder
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeViewHolder.PrepublishingHomeListItemViewHolder
import org.wordpress.android.ui.posts.prepublishing.home.PrepublishingHomeViewHolder.PrepublishingSocialItemViewHolder
Expand Down Expand Up @@ -71,8 +70,6 @@ class PrepublishingHomeAdapter(context: Context) : RecyclerView.Adapter<Prepubli
is HomeUiState -> VIEW_TYPE_HOME_ITEM
is ButtonUiState -> VIEW_TYPE_SUBMIT_BUTTON
is SocialUiState -> VIEW_TYPE_SOCIAL_ITEM
is StoryTitleUiState ->
throw IllegalStateException("StoryTitleUiState is not supported by the PrepublishingHomeAdapter")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ sealed class PrepublishingHomeItemUiState(
val onNavigationActionClicked: ((navigationAction: ActionType.PrepublishingScreenNavigation) -> Unit)?
) : PrepublishingHomeItemUiState()

data class StoryTitleUiState(
val storyThumbnailUrl: String,
val storyTitle: UiStringText? = null,
val onStoryTitleChanged: (String) -> Unit
) :
PrepublishingHomeItemUiState()

data class HeaderUiState(val siteName: UiStringText, val siteIconUrl: String) :
PrepublishingHomeItemUiState()

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions WordPress/src/main/res/drawable/ic_story_icon_24dp.xml

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions WordPress/src/main/res/layout/photo_picker_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/wp_stories_take_picture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginBottom="@dimen/fab_margin_stories"
android:layout_marginEnd="@dimen/fab_margin"
android:contentDescription="@string/photo_picker_camera_desc"
android:src="@drawable/ic_photo_camera_24px"
android:visibility="gone"
tools:ignore="InconsistentLayout" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand Down

This file was deleted.

Loading