Remove sidebar_visible
This commit is contained in:
@@ -8,6 +8,5 @@ import lombok.Data;
|
||||
public class BookViewerSetting {
|
||||
private int pageNumber;
|
||||
private String zoom;
|
||||
private Boolean sidebarVisible;
|
||||
private String spread;
|
||||
}
|
||||
-1
@@ -8,6 +8,5 @@ import lombok.Data;
|
||||
public class PdfViewerPreferences {
|
||||
private Long bookId;
|
||||
private String zoom;
|
||||
private Boolean sidebarVisible;
|
||||
private String spread;
|
||||
}
|
||||
-1
@@ -33,7 +33,6 @@ public class AppSettings {
|
||||
public static class PdfSettings {
|
||||
private String spread;
|
||||
private String zoom;
|
||||
private Boolean sidebar;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ public class BookPreferences {
|
||||
public static class PdfReaderSetting {
|
||||
private String pageSpread;
|
||||
private String pageZoom;
|
||||
private boolean showSidebar;
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
-3
@@ -27,9 +27,6 @@ public class PdfViewerPreferencesEntity {
|
||||
@Column(name = "zoom")
|
||||
private String zoom;
|
||||
|
||||
@Column(name = "sidebar_visible")
|
||||
private Boolean sidebarVisible;
|
||||
|
||||
@Column(name = "spread")
|
||||
private String spread;
|
||||
}
|
||||
@@ -44,7 +44,6 @@ public class AppSettingService {
|
||||
appSettingsBuilder.pdf(AppSettings.PdfSettings.builder()
|
||||
.spread((String) pdfSettings.get("spread"))
|
||||
.zoom((String) pdfSettings.get("zoom"))
|
||||
.sidebar(Boolean.parseBoolean((String) pdfSettings.get("sidebar")))
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ public class BooksService {
|
||||
.ifPresent(pdfPref -> settingsBuilder.pdfSettings(PdfViewerPreferences.builder()
|
||||
.bookId(bookId)
|
||||
.zoom(pdfPref.getZoom())
|
||||
.sidebarVisible(pdfPref.getSidebarVisible())
|
||||
.spread(pdfPref.getSpread())
|
||||
.build()));
|
||||
} else {
|
||||
@@ -90,7 +89,6 @@ public class BooksService {
|
||||
PdfViewerPreferences pdfSettings = bookViewerSettings.getPdfSettings();
|
||||
pdfPrefs.setZoom(pdfSettings.getZoom());
|
||||
pdfPrefs.setSpread(pdfSettings.getSpread());
|
||||
pdfPrefs.setSidebarVisible(pdfSettings.getSidebarVisible());
|
||||
pdfViewerPreferencesRepository.save(pdfPrefs);
|
||||
|
||||
} else if (bookEntity.getBookType() == BookFileType.EPUB) {
|
||||
|
||||
-1
@@ -108,7 +108,6 @@ public class UserCreatorService {
|
||||
.pdf(BookPreferences.GlobalOrIndividual.Individual)
|
||||
.build())
|
||||
.pdfReaderSetting(BookPreferences.PdfReaderSetting.builder()
|
||||
.showSidebar(false)
|
||||
.pageSpread("odd")
|
||||
.pageZoom("page-fit")
|
||||
.build())
|
||||
|
||||
@@ -119,7 +119,6 @@ CREATE TABLE IF NOT EXISTS pdf_viewer_preference
|
||||
user_id BIGINT NOT NULL,
|
||||
book_id BIGINT NOT NULL,
|
||||
zoom VARCHAR(16) NULL,
|
||||
sidebar_visible BOOLEAN NULL,
|
||||
spread VARCHAR(16) NULL,
|
||||
UNIQUE (user_id, book_id)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user