use of com.winsonchiu.reader.data.reddit.Replyable in project Reader by TheKeeperOfPie.
the class ControllerInbox method setReplyText.
public boolean setReplyText(String name, String text, boolean collapsed) {
for (int index = 0; index < data.getChildren().size(); index++) {
Thing thing = data.getChildren().get(index);
if (thing.getName().equals(name)) {
((Replyable) thing).setReplyText(text);
((Replyable) thing).setReplyExpanded(!collapsed);
for (Listener listener : listeners) {
listener.getAdapter().notifyItemChanged(index);
}
return true;
}
}
return false;
}
use of com.winsonchiu.reader.data.reddit.Replyable in project Reader by TheKeeperOfPie.
the class ControllerSearch method setReplyTextLinks.
public boolean setReplyTextLinks(String name, String text, boolean collapsed) {
for (int index = 0; index < links.getChildren().size(); index++) {
Thing thing = links.getChildren().get(index);
if (thing.getName().equals(name)) {
((Replyable) thing).setReplyText(text);
((Replyable) thing).setReplyExpanded(!collapsed);
eventHolder.callLinks(new RxAdapterEvent<>(getLinksModel(), RxAdapterEvent.Type.CHANGE, index + 1));
return true;
}
}
return false;
}
Aggregations