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