feat(reader): add epub reader tap navigation for mobile (#1909)
Co-authored-by: Alex <25013571+alexhb1@users.noreply.github.com>
This commit is contained in:
@@ -186,6 +186,7 @@ public class BookLoreUser {
|
||||
private Integer maxInlineSize;
|
||||
private String theme;
|
||||
private String flow;
|
||||
private Boolean tapToTurnPage;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -91,6 +91,7 @@ public class DefaultUserSettingsProvider {
|
||||
.maxInlineSize(720)
|
||||
.theme("gray")
|
||||
.flow("paginated")
|
||||
.tapToTurnPage(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.booklore.service.user;
|
||||
|
||||
import org.booklore.model.dto.BookLoreUser;
|
||||
import org.booklore.model.dto.settings.UserSettingKey;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||
|
||||
class DefaultUserSettingsProviderTest {
|
||||
|
||||
private DefaultUserSettingsProvider provider;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
provider = new DefaultUserSettingsProvider();
|
||||
provider.init();
|
||||
}
|
||||
|
||||
@Test
|
||||
void ebookReaderDefaults_shouldEnableTapToTurnPage() {
|
||||
Object value = provider.getDefaultValue(UserSettingKey.EBOOK_READER_SETTING);
|
||||
|
||||
BookLoreUser.UserSettings.EbookReaderSetting setting =
|
||||
assertInstanceOf(BookLoreUser.UserSettings.EbookReaderSetting.class, value);
|
||||
assertEquals(Boolean.TRUE, setting.getTapToTurnPage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user