fixed NPEs
This commit is contained in:
parent
558491f4ee
commit
0925c2713c
|
@ -35,8 +35,8 @@ android {
|
||||||
applicationId "org.mariotaku.twidere"
|
applicationId "org.mariotaku.twidere"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 217
|
versionCode 218
|
||||||
versionName '3.2.13'
|
versionName '3.3.0'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'
|
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'
|
||||||
|
|
|
@ -226,7 +226,7 @@ public abstract class TabConfiguration {
|
||||||
this.view = view;
|
this.view = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,11 +55,11 @@ class UserExtraConfiguration(key: String) : TabConfiguration.ExtraConfiguration(
|
||||||
hintView.visibility = View.VISIBLE
|
hintView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
1 -> {
|
1 -> {
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
val user: ParcelableUser = data.getParcelableExtra(EXTRA_USER)
|
val user: ParcelableUser = data!!.getParcelableExtra(EXTRA_USER)
|
||||||
viewHolder.display(user, dependencyHolder.mediaLoader, dependencyHolder.userColorNameManager, true)
|
viewHolder.display(user, dependencyHolder.mediaLoader, dependencyHolder.userColorNameManager, true)
|
||||||
viewHolder.view.visibility = View.VISIBLE
|
viewHolder.view.visibility = View.VISIBLE
|
||||||
hintView.visibility = View.GONE
|
hintView.visibility = View.GONE
|
||||||
|
|
|
@ -55,11 +55,11 @@ class UserListExtraConfiguration(key: String) : TabConfiguration.ExtraConfigurat
|
||||||
hintView.visibility = View.VISIBLE
|
hintView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
1 -> {
|
1 -> {
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
val userList: ParcelableUserList = data.getParcelableExtra(EXTRA_USER_LIST)
|
val userList: ParcelableUserList = data!!.getParcelableExtra(EXTRA_USER_LIST)
|
||||||
viewHolder.display(userList, dependencyHolder.mediaLoader,
|
viewHolder.display(userList, dependencyHolder.mediaLoader,
|
||||||
dependencyHolder.userColorNameManager, true)
|
dependencyHolder.userColorNameManager, true)
|
||||||
viewHolder.itemView.visibility = View.VISIBLE
|
viewHolder.itemView.visibility = View.VISIBLE
|
||||||
|
|
Loading…
Reference in New Issue