Skip to content

Commit 5cda54b

Browse files
committed
修复bug
1 parent 05ce442 commit 5cda54b

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

app/src/main/java/net/coding/program/project/detail/TaskListFragment.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,29 @@ String checkHostFilter() {
180180
String host = "";
181181
int userId = mMembers.user_id;
182182

183-
//关注,创建可以返回数据
184-
if (userId == 0 && !TextUtils.isEmpty(mMeAction) && !mMeAction.equals("owner")) {
185-
userId = MyApp.sUserObject.id;
183+
//项目内 不是全部任务
184+
if (mShowAdd && userId != 0) {
185+
if (!TextUtils.isEmpty(mMeAction)) {
186+
host += String.format("owner=%s&", userId);
187+
}
188+
//关注,创建可以返回数据
189+
if (!TextUtils.isEmpty(mMeAction) && !mMeAction.equals("owner")) {
190+
if (!TextUtils.isEmpty(mMeAction)) {
191+
host += String.format("%s=%s&", mMeAction, MyApp.sUserObject.id);
192+
}
193+
}
194+
} else if (mShowAdd) {
195+
//项目内 全部任务
196+
if (!TextUtils.isEmpty(mMeAction) && !mMeAction.equals("owner")) {
197+
host += String.format("%s=%s&", mMeAction, MyApp.sUserObject.id);
198+
}
199+
} else {
200+
//项目外
201+
if (!TextUtils.isEmpty(mMeAction) && userId != 0) {
202+
host += String.format("%s=%s&", mMeAction, userId);
203+
}
186204
}
187205

188-
if (!TextUtils.isEmpty(mMeAction) && userId != 0) {
189-
host += String.format("%s=%s&", mMeAction, userId);
190-
}
191206
if (!TextUtils.isEmpty(mStatus) && !mStatus.equals("0")) {
192207
host += String.format("status=%s&", mStatus);
193208
}

0 commit comments

Comments
 (0)