mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-14 18:50:39 +01:00
fixed NPE
This commit is contained in:
parent
0a07322616
commit
b86ec8a69c
@ -36,19 +36,22 @@ class UserListMembersLoader(
|
|||||||
private val listId: String?,
|
private val listId: String?,
|
||||||
private val userKey: UserKey?,
|
private val userKey: UserKey?,
|
||||||
private val screenName: String?,
|
private val screenName: String?,
|
||||||
private val listName: String,
|
private val listName: String?,
|
||||||
data: List<ParcelableUser>?,
|
data: List<ParcelableUser>?,
|
||||||
fromUser: Boolean
|
fromUser: Boolean
|
||||||
) : CursorSupportUsersLoader(context, accountKey, data, fromUser) {
|
) : CursorSupportUsersLoader(context, accountKey, data, fromUser) {
|
||||||
|
|
||||||
@Throws(MicroBlogException::class)
|
@Throws(MicroBlogException::class)
|
||||||
public override fun getCursoredUsers(twitter: MicroBlog, details: AccountDetails, paging: Paging): PageableResponseList<User> {
|
public override fun getCursoredUsers(twitter: MicroBlog, details: AccountDetails, paging: Paging): PageableResponseList<User> {
|
||||||
if (listId != null)
|
if (listId != null) {
|
||||||
return twitter.getUserListMembers(listId, paging)
|
return twitter.getUserListMembers(listId, paging)
|
||||||
else if (userKey != null)
|
} else if (listName != null) {
|
||||||
return twitter.getUserListMembers(listName.replace(' ', '-'), userKey.id, paging)
|
if (userKey != null) {
|
||||||
else if (screenName != null)
|
return twitter.getUserListMembers(listName.replace(' ', '-'), userKey.id, paging)
|
||||||
return twitter.getUserListMembersByScreenName(listName.replace(' ', '-'), screenName, paging)
|
} else if (screenName != null) {
|
||||||
|
return twitter.getUserListMembersByScreenName(listName.replace(' ', '-'), screenName, paging)
|
||||||
|
}
|
||||||
|
}
|
||||||
throw MicroBlogException("list_id or list_name and user_id (or screen_name) required")
|
throw MicroBlogException("list_id or list_name and user_id (or screen_name) required")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
android:title="@string/project_account">
|
android:title="@string/project_account">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=583328497@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=583328497@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="@string/developer_name"
|
android:summary="@string/developer_name"
|
||||||
android:title="@string/developed_by">
|
android:title="@string/developed_by">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=57610574@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=57610574@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
@ -37,7 +37,7 @@
|
|||||||
android:title="@string/translators">
|
android:title="@string/translators">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user_list_members?list_id=99024901&user_key=583328497@twitter.com&finish_only=true"/>
|
android:data="twidere://user_list_members?list_id=99024901&user_key=583328497@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/special_thanks_to">
|
<PreferenceCategory android:title="@string/special_thanks_to">
|
||||||
@ -53,49 +53,49 @@
|
|||||||
android:title="ilovinheart">
|
android:title="ilovinheart">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=144878723@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=144878723@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="Adjusted icon from 0.0.13 version to 0.2.9.10 version"
|
android:summary="Adjusted icon from 0.0.13 version to 0.2.9.10 version"
|
||||||
android:title="lordfriend">
|
android:title="lordfriend">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=450691326@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=450691326@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="Designed 3D Twidere icon"
|
android:summary="Designed 3D Twidere icon"
|
||||||
android:title="Linkzero">
|
android:title="Linkzero">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=12630242@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=12630242@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="He taught me some useful things about SQLite"
|
android:summary="He taught me some useful things about SQLite"
|
||||||
android:title="impulseplus">
|
android:title="impulseplus">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=332135263@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=332135263@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="Checked Japanese translation for Luigi Van"
|
android:summary="Checked Japanese translation for Luigi Van"
|
||||||
android:title="Lin Yan">
|
android:title="Lin Yan">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=218536728@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=218536728@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="Redesigned interface, polished settings & writing style"
|
android:summary="Redesigned interface, polished settings & writing style"
|
||||||
android:title="Uucky Lee">
|
android:title="Uucky Lee">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=1062473329@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=1062473329@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
<Preference
|
<Preference
|
||||||
android:summary="Special birthday banner image"
|
android:summary="Special birthday banner image"
|
||||||
android:title="sacrish">
|
android:title="sacrish">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=7758552@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=7758552@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/sponsored_by">
|
<PreferenceCategory android:title="@string/sponsored_by">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
android:title="@string/kuma_union">
|
android:title="@string/kuma_union">
|
||||||
<intent
|
<intent
|
||||||
android:action="android.intent.action.VIEW"
|
android:action="android.intent.action.VIEW"
|
||||||
android:data="twidere://user?user_key=514378421@twitter.com&finish_only=true"/>
|
android:data="twidere://user?user_key=514378421@twitter.com&account_host=twitter.com&finish_only=true"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user