Red icon when there are new replies.

"Err" should be enough to indicate a load error.
captchafix
Florens Douwes 11 years ago
parent d856721b8d
commit 49c908029d
  1. 9
      Chan/src/org/floens/chan/ui/adapter/PinnedAdapter.java

@ -7,6 +7,7 @@ import org.floens.chan.ChanApplication;
import org.floens.chan.R;
import org.floens.chan.core.ChanPreferences;
import org.floens.chan.core.model.Pin;
import org.floens.chan.core.watch.PinWatcher;
import android.content.Context;
import android.view.LayoutInflater;
@ -49,11 +50,13 @@ public class PinnedAdapter extends ArrayAdapter<Pin> {
frameLayout.setVisibility(View.VISIBLE);
TextView itemCount = (TextView) view.findViewById(R.id.drawer_item_count);
PinWatcher watcher = item.getPinWatcher();
if (item.isError()) {
itemCount.setText("Err");
} else {
int count = item.getPinWatcher() == null ? 0 : item.getNewPostsCount();
int count = item.getNewPostsCount();
String total = Integer.toString(count);
if (count > 999) {
total = "1k+";
@ -71,7 +74,7 @@ public class PinnedAdapter extends ArrayAdapter<Pin> {
if (!item.watching) {
frameLayout.setBackgroundResource(R.drawable.pin_icon_gray);
} else if (item.isError()) {
} else if (item.getNewQuoteCount() > 0) {
frameLayout.setBackgroundResource(R.drawable.pin_icon_red);
} else {
frameLayout.setBackgroundResource(R.drawable.pin_icon_blue);

Loading…
Cancel
Save