aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-08-16 00:24:22 -0700
committerAllan Wang <me@allanwang.ca>2019-08-16 00:24:22 -0700
commit71dcceaf1970873596a59a734f1a574120beff6b (patch)
treed8d79984f591ec5fc43ac93a15715eaef9b887d3 /mediapicker/src
parentd6f213563be35b183f81e20e95d925dbd65e4694 (diff)
parenta9407288fad0d30e71e2f6862b66533e043f9311 (diff)
downloadkau-71dcceaf1970873596a59a734f1a574120beff6b.tar.gz
kau-71dcceaf1970873596a59a734f1a574120beff6b.tar.bz2
kau-71dcceaf1970873596a59a734f1a574120beff6b.zip
Fix conflicts
Diffstat (limited to 'mediapicker/src')
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt2
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt9
2 files changed, 4 insertions, 7 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt
index 873289f..e801848 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt
@@ -40,7 +40,7 @@ class MediaItemBasic(val data: MediaModel) :
@SuppressLint("NewApi")
fun bindEvents(activity: Activity, fastAdapter: FastAdapter<MediaItemBasic>) {
fastAdapter.getSelectExtension().isSelectable = true
- //add image data and return right away
+ // add image data and return right away
fastAdapter.onClickListener = { _, _, item, _ ->
activity.finish(arrayListOf(item.data))
true
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt
index cc6df81..68d1121 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt
@@ -46,7 +46,6 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.RequestManager
import com.mikepenz.fastadapter.GenericItem
import com.mikepenz.fastadapter.adapters.ItemAdapter
-import com.mikepenz.iconics.dsl.ExperimentalIconicsDSL
import com.mikepenz.iconics.dsl.iconicsDrawable
import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
@@ -88,11 +87,9 @@ abstract class MediaPickerCore<T : GenericItem>(
/**
* Create error tile for a given item
*/
- @ExperimentalIconicsDSL
fun getErrorDrawable(context: Context) =
getIconDrawable(context, GoogleMaterial.Icon.gmd_error, accentColor)
- @ExperimentalIconicsDSL
fun getIconDrawable(context: Context, iicon: IIcon, color: Int): Drawable {
val sizePx = computeViewSize(context)
return context.iconicsDrawable(iicon) {
@@ -159,7 +156,7 @@ abstract class MediaPickerCore<T : GenericItem>(
}
}
- //Sort by descending date
+ // Sort by descending date
var sortQuery = MediaStore.MediaColumns.DATE_MODIFIED + " DESC"
override fun onCreateLoader(id: Int, args: Bundle?): Loader<Cursor> {
@@ -266,8 +263,8 @@ abstract class MediaPickerCore<T : GenericItem>(
}.mapNotNull {
DocumentsContract.getDocumentId(it).split(":").getOrNull(1)
}.joinToString(prefix = "(", separator = ",", postfix = ")")
- //? query replacements are done for one arg at a time
- //since we potentially have a list of ids, we'll just format the WHERE clause ourself
+ // ? query replacements are done for one arg at a time
+ // since we potentially have a list of ids, we'll just format the WHERE clause ourself
query(baseUri, MediaModel.projection, "${BaseColumns._ID} IN $ids", null, sortQuery)?.use(
block
)