feat:优化首页Tab-Fragment的可见检测逻辑

fix:修复部分空指针异常
This commit is contained in:
max
2024-05-11 10:54:27 +08:00
parent f121ef5ad1
commit f76582b1f6
8 changed files with 90 additions and 47 deletions

View File

@@ -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;
}