refactor: remove readonly wording from thread status surfaces
This commit is contained in:
@@ -117,8 +117,8 @@ public class ConversationInfoActivity extends BossScreenActivity {
|
||||
appendContent(BossUi.buildWechatMenuRow(
|
||||
this,
|
||||
"线程状态",
|
||||
"只读状态文档和最近进展事件",
|
||||
projectFolderName.isEmpty() ? "只读" : projectFolderName + " · 只读",
|
||||
"状态文档和最近进展事件",
|
||||
projectFolderName.isEmpty() ? null : projectFolderName,
|
||||
null,
|
||||
v -> openThreadStatus()
|
||||
));
|
||||
|
||||
@@ -20,8 +20,8 @@ public class ThreadStatusActivity extends BossScreenActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
projectId = getIntent().getStringExtra(EXTRA_PROJECT_ID);
|
||||
projectName = getIntent().getStringExtra(EXTRA_PROJECT_NAME);
|
||||
configureScreen("线程状态", projectName == null ? "只读状态文档" : projectName);
|
||||
setHeaderAction("只读", v -> showMessage("线程状态只读"));
|
||||
configureScreen("线程状态", projectName == null ? "线程状态文档" : projectName);
|
||||
hideHeaderAction();
|
||||
reload();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ThreadStatusActivity extends BossScreenActivity {
|
||||
appendContent(BossUi.buildSimpleProfileHeader(
|
||||
this,
|
||||
threadDisplayName,
|
||||
"只读状态文档",
|
||||
"线程状态文档",
|
||||
buildHeaderDetail(document, recentProgressEvents)
|
||||
));
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ThreadStatusActivity extends BossScreenActivity {
|
||||
this,
|
||||
"最近进展事件",
|
||||
count <= 0 ? "当前还没有进展事件。" : "共 " + count + " 条",
|
||||
"只读视图 · 最近 5 条",
|
||||
"自动同步 · 最近 5 条",
|
||||
null,
|
||||
null
|
||||
));
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.hyzq.boss;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -64,7 +65,8 @@ public class ThreadStatusActivityTest {
|
||||
assertTrue(viewTreeContainsText(content, "事件 2"));
|
||||
assertTrue(viewTreeContainsText(content, "事件 1"));
|
||||
assertEquals("project-1", apiClient.lastRequestedProjectId);
|
||||
assertEquals("只读", String.valueOf(activity.findViewById(R.id.screen_header_action).getContentDescription()));
|
||||
assertEquals(View.GONE, activity.findViewById(R.id.screen_header_action).getVisibility());
|
||||
assertFalse(viewTreeContainsText(content, "只读状态文档"));
|
||||
}
|
||||
|
||||
private static final class TestThreadStatusActivity extends ThreadStatusActivity {
|
||||
|
||||
Reference in New Issue
Block a user