Poll notifications (#1229)

* show poll notifications in the app

* show poll notifications in the app

* allow filtering poll notifications in the poll fragment

* show poll notifications in system notifications
This commit is contained in:
Konrad Pozniak 2019-05-02 19:44:35 +02:00 committed by GitHub
commit e735e4843e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 1076 additions and 318 deletions

View file

@ -41,6 +41,7 @@ data class AccountEntity(@field:PrimaryKey(autoGenerate = true) var id: Long,
var notificationsFollowed: Boolean = true,
var notificationsReblogged: Boolean = true,
var notificationsFavorited: Boolean = true,
var notificationsPolls: Boolean = true,
var notificationSound: Boolean = true,
var notificationVibration: Boolean = true,
var notificationLight: Boolean = true,

View file

@ -30,7 +30,7 @@ import androidx.annotation.NonNull;
@Database(entities = {TootEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
TimelineAccountEntity.class, ConversationEntity.class
}, version = 15)
}, version = 16)
public abstract class AppDatabase extends RoomDatabase {
public abstract TootDao tootDao();
@ -279,4 +279,11 @@ public abstract class AppDatabase extends RoomDatabase {
}
};
public static final Migration MIGRATION_15_16 = new Migration(15, 16) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `notificationsPolls` INTEGER NOT NULL DEFAULT 1");
}
};
}