feat:优化首页Tab-Fragment的可见检测逻辑
fix:修复部分空指针异常
This commit is contained in:
@@ -840,6 +840,9 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
|
||||
@Override
|
||||
public boolean isSamePartition(long partitionId) {
|
||||
if (currentUserInfo == null) {
|
||||
return false;
|
||||
}
|
||||
if (currentUserInfo.partitionId == 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -848,6 +851,9 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
|
||||
@Override
|
||||
public long getPartitionId() {
|
||||
if (currentUserInfo == null) {
|
||||
return 0;
|
||||
}
|
||||
return currentUserInfo.partitionId;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user