Add archived/locked message to status bar

captchafix
Floens 11 years ago
parent 218c71d5d7
commit 7d1bbd91cb
  1. 18
      Clover/app/src/main/java/org/floens/chan/ui/adapter/PostAdapter.java
  2. 2
      Clover/app/src/main/res/values/strings.xml

@ -350,12 +350,22 @@ public class PostAdapter extends BaseAdapter implements Filterable {
if (error != null) {
setText(error);
} else {
String prefix = "";
Post op = threadManager.getLoader().getOP();
if (op != null) {
if (op.archived) {
prefix = context.getString(R.string.thread_archived) + " - ";
} else if (op.closed) {
prefix = context.getString(R.string.thread_closed) + " - ";
}
}
if (threadManager.shouldWatch()) {
long time = loader.getTimeUntilLoadMore() / 1000L;
if (time == 0) {
setText(context.getString(R.string.thread_refresh_now));
setText(prefix + context.getString(R.string.thread_refresh_now));
} else {
setText(context.getString(R.string.thread_refresh_countdown, time));
setText(prefix + context.getString(R.string.thread_refresh_countdown, time));
}
new Handler().postDelayed(new Runnable() {
@ -368,9 +378,9 @@ public class PostAdapter extends BaseAdapter implements Filterable {
}, 1000);
} else {
if (loader.getTimeUntilLoadMore() == 0) {
setText(context.getString(R.string.thread_refresh_now));
setText(prefix + context.getString(R.string.thread_refresh_now));
} else {
setText(context.getString(R.string.thread_refresh_bar_inactive));
setText(prefix + context.getString(R.string.thread_refresh_bar_inactive));
}
}

@ -74,6 +74,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<string name="thread_refresh_now">Loading</string>
<string name="thread_refresh_countdown">Loading in %1$d</string>
<string name="thread_load_failed_retry">Retry</string>
<string name="thread_archived">Archived</string>
<string name="thread_closed">Closed</string>
<string name="board_edit">Board editor</string>
<string name="board_add">Add board</string>

Loading…
Cancel
Save