-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Photo picker #10141
Photo picker #10141
Changes from all commits
0bae491
a431709
edd9f45
e803abb
8b20a01
9c93cde
aebb58a
e00f619
cc24608
755df2d
7fb0f93
a405cb4
56227fb
278be69
4a9d472
42e54ac
6f6f26a
aab09a4
bca9469
6647482
eaedcb1
8273e47
f662c97
d5703fd
40236e0
108681a
7dc371d
cd89efa
b06aa3f
e080b19
878bb05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,13 @@ fun <T : Any> LiveData<T?>.filterNotNull(): LiveData<T> { | |
} | ||
return mediator | ||
} | ||
|
||
fun <T> LiveData<T>.filter(predicate: (T) -> Boolean): LiveData<T> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was originally a part of the MediaPicker library and was removed. |
||
val mediator = MediatorLiveData<T>() | ||
mediator.addSource(this) { | ||
if (it != null && predicate(it)) { | ||
mediator.value = it | ||
} | ||
} | ||
return mediator | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,9 +94,9 @@ data class Product( | |
@Parcelize | ||
data class Image( | ||
val id: Long, | ||
val name: String, | ||
val name: String?, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the cause of this change and the similar one below @0nko? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An update in the FluxC library: wordpress-mobile/WordPress-FluxC-Android#2886 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @0nko for the clariffication, I was confused because we updated the repo to align with this FluxC change a while ago #10078, but now I understand, this is caused by this commit wordpress-mobile/WordPress-MediaPicker-Android@9629167 |
||
val source: String, | ||
val dateCreated: Date | ||
val dateCreated: Date? | ||
) : Parcelable | ||
|
||
fun isSameProduct(product: Product): Boolean { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this, I think we need to move this to be specific to
release
builds (in a separate PR), otherwise it might break automated screenshots that rely on the permissionwoocommerce-android/WooCommerce/src/debug/AndroidManifest.xml
Lines 11 to 14 in 7146aac