mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-08 07:48:45 +01:00
fixed add gif intent
This commit is contained in:
parent
222e2af02e
commit
9a06fbb983
@ -332,7 +332,12 @@ class ComposeActivity : BaseActivity(), OnMenuItemClickListener, OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
REQUEST_ADD_GIF -> {
|
REQUEST_ADD_GIF -> {
|
||||||
|
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||||
|
val intent = ThemedMediaPickerActivity.withThemed(this@ComposeActivity)
|
||||||
|
.getMedia(data.data)
|
||||||
|
.build()
|
||||||
|
startActivityForResult(intent, REQUEST_PICK_MEDIA)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,7 +526,7 @@ class ComposeActivity : BaseActivity(), OnMenuItemClickListener, OnClickListener
|
|||||||
}
|
}
|
||||||
R.id.add_gif -> {
|
R.id.add_gif -> {
|
||||||
val provider = gifShareProvider ?: return true
|
val provider = gifShareProvider ?: return true
|
||||||
startActivityForResult(provider.createGifSelectorIntent(), REQUEST_SET_SCHEDULE)
|
startActivityForResult(provider.createGifSelectorIntent(), REQUEST_ADD_GIF)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
when (item.groupId) {
|
when (item.groupId) {
|
||||||
|
@ -12,6 +12,8 @@ import com.bumptech.glide.Glide
|
|||||||
import org.mariotaku.twidere.adapter.StaggeredGridParcelableStatusesAdapter
|
import org.mariotaku.twidere.adapter.StaggeredGridParcelableStatusesAdapter
|
||||||
import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter
|
import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter
|
||||||
import org.mariotaku.twidere.constant.IntentConstants.*
|
import org.mariotaku.twidere.constant.IntentConstants.*
|
||||||
|
import org.mariotaku.twidere.extensions.reachingEnd
|
||||||
|
import org.mariotaku.twidere.extensions.reachingStart
|
||||||
import org.mariotaku.twidere.loader.MediaTimelineLoader
|
import org.mariotaku.twidere.loader.MediaTimelineLoader
|
||||||
import org.mariotaku.twidere.loader.iface.IExtendedLoader
|
import org.mariotaku.twidere.loader.iface.IExtendedLoader
|
||||||
import org.mariotaku.twidere.model.ParcelableStatus
|
import org.mariotaku.twidere.model.ParcelableStatus
|
||||||
@ -36,26 +38,11 @@ class UserMediaTimelineFragment : AbsContentRecyclerViewFragment<StaggeredGridPa
|
|||||||
super.refreshing = value
|
super.refreshing = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override val reachingEnd: Boolean
|
override val reachingEnd: Boolean
|
||||||
get() {
|
get() = layoutManager.reachingEnd
|
||||||
val lm = layoutManager
|
|
||||||
var visiblePos = lm.findLastCompletelyVisibleItemPositions(null)
|
|
||||||
if (visiblePos.all { it == RecyclerView.NO_POSITION }) {
|
|
||||||
visiblePos = lm.findLastVisibleItemPositions(null)
|
|
||||||
}
|
|
||||||
return visiblePos.contains(lm.itemCount - 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
override val reachingStart: Boolean
|
override val reachingStart: Boolean
|
||||||
get() {
|
get() = layoutManager.reachingStart
|
||||||
val lm = layoutManager
|
|
||||||
var visiblePos = lm.findFirstCompletelyVisibleItemPositions(null)
|
|
||||||
if (visiblePos.all { it == RecyclerView.NO_POSITION }) {
|
|
||||||
visiblePos = lm.findFirstVisibleItemPositions(null)
|
|
||||||
}
|
|
||||||
return visiblePos.contains(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onActivityCreated(savedInstanceState)
|
||||||
|
@ -1288,4 +1288,5 @@
|
|||||||
<string name="users_blocked">Blocked these users.</string>
|
<string name="users_blocked">Blocked these users.</string>
|
||||||
<string name="users_lists_with_name"><xliff:g id="name">%s</xliff:g>\'s lists</string>
|
<string name="users_lists_with_name"><xliff:g id="name">%s</xliff:g>\'s lists</string>
|
||||||
<string name="users_statuses">User\'s tweets</string>
|
<string name="users_statuses">User\'s tweets</string>
|
||||||
|
<string name="hint_search_gif">Search GIF</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user