Removes unused icons and does bits of cleanup.
This commit is contained in:
parent
ec57f28d16
commit
87600b016f
5 changed files with 13 additions and 23 deletions
|
@ -130,9 +130,8 @@ public class StatusViewHolder extends RecyclerView.ViewHolder {
|
|||
Context context = avatar.getContext();
|
||||
boolean hasReblog = rebloggedUrl != null && !rebloggedUrl.isEmpty();
|
||||
int padding = hasReblog ? Utils.dpToPx(context, 12) : 0;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
|
||||
avatar.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
|
||||
avatar.setPadding(padding, 0, 0, padding);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
avatar.setPaddingRelative(0, 0, padding, padding);
|
||||
} else {
|
||||
avatar.setPadding(0, 0, padding, padding);
|
||||
}
|
||||
|
@ -369,7 +368,8 @@ public class StatusViewHolder extends RecyclerView.ViewHolder {
|
|||
sensitiveMediaWarning.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void setSpoilerText(String spoilerText, final boolean expanded, final StatusActionListener listener) {
|
||||
private void setSpoilerText(String spoilerText, final boolean expanded,
|
||||
final StatusActionListener listener) {
|
||||
contentWarningDescription.setText(spoilerText);
|
||||
contentWarningBar.setVisibility(View.VISIBLE);
|
||||
contentWarningButton.setChecked(expanded);
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.keylesspalace.tusky.entity.Status;
|
|||
import com.keylesspalace.tusky.interfaces.StatusActionListener;
|
||||
import com.keylesspalace.tusky.receiver.TimelineReceiver;
|
||||
import com.keylesspalace.tusky.util.HttpHeaderLink;
|
||||
import com.keylesspalace.tusky.util.ListUtils;
|
||||
import com.keylesspalace.tusky.util.PairedList;
|
||||
import com.keylesspalace.tusky.util.ThemeUtils;
|
||||
import com.keylesspalace.tusky.util.ViewDataUtils;
|
||||
|
@ -436,7 +437,7 @@ public class NotificationsFragment extends SFragment implements
|
|||
|
||||
public void update(@Nullable List<Notification> newNotifications, @Nullable String fromId,
|
||||
@Nullable String uptoId) {
|
||||
if (newNotifications == null || newNotifications.isEmpty()) {
|
||||
if (ListUtils.isEmpty(newNotifications)) {
|
||||
return;
|
||||
}
|
||||
if (fromId != null) {
|
||||
|
@ -465,12 +466,15 @@ public class NotificationsFragment extends SFragment implements
|
|||
}
|
||||
|
||||
public void addItems(List<Notification> newNotifications, @Nullable String fromId) {
|
||||
if (ListUtils.isEmpty(newNotifications)) {
|
||||
return;
|
||||
}
|
||||
if (fromId != null) {
|
||||
bottomId = fromId;
|
||||
}
|
||||
int end = notifications.size();
|
||||
Notification last = notifications.get(end - 1);
|
||||
if (last != null && !findNotification(newNotifications, last.id) && newNotifications.size() > 0) {
|
||||
if (last != null && !findNotification(newNotifications, last.id)) {
|
||||
notifications.addAll(newNotifications);
|
||||
List<NotificationViewData> newViewDatas = notifications.getPairedCopy()
|
||||
.subList(notifications.size() - newNotifications.size(),
|
||||
|
|
|
@ -642,7 +642,9 @@ public class TimelineFragment extends SFragment implements
|
|||
newStatuses.size(), newViewDatas.size(), statuses.size());
|
||||
throw new AssertionError(error);
|
||||
}
|
||||
if (fromId != null) bottomId = fromId;
|
||||
if (fromId != null) {
|
||||
bottomId = fromId;
|
||||
}
|
||||
adapter.addItems(newViewDatas);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue