Fix crash with unknown notification type (#1123)

* Fix crash with unknown notification type

* Add NotificationTypeAdapter to handle unknown type

* Remove unneeded SerializedName
This commit is contained in:
kyori19 2019-03-16 22:33:16 +09:00 committed by Konrad Pozniak
commit d0f7f6f83c
3 changed files with 39 additions and 6 deletions

View file

@ -136,6 +136,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
(NotificationViewData.Concrete) notification;
Notification.Type type = concreteNotificaton.getType();
switch (type) {
default:
case MENTION: {
StatusViewHolder holder = (StatusViewHolder) viewHolder;
StatusViewData.Concrete status = concreteNotificaton.getStatusViewData();