Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: book reader swipe pagination #2754

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions API/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public async Task<ActionResult<UserPreferencesDto>> UpdatePreferences(UserPrefer
existingPreferences.BookReaderFontFamily = preferencesDto.BookReaderFontFamily;
existingPreferences.BookReaderFontSize = preferencesDto.BookReaderFontSize;
existingPreferences.BookReaderTapToPaginate = preferencesDto.BookReaderTapToPaginate;
existingPreferences.BookReaderSwipeToPaginate = preferencesDto.BookReaderSwipeToPaginate;
existingPreferences.BookReaderScrollThreshold = preferencesDto.BookReaderScrollThreshold;
existingPreferences.BookReaderDistanceThreshold = preferencesDto.BookReaderDistanceThreshold;
existingPreferences.BookReaderSpeedThreshold = preferencesDto.BookReaderSpeedThreshold;
existingPreferences.BookReaderReadingDirection = preferencesDto.BookReaderReadingDirection;
existingPreferences.BookReaderWritingStyle = preferencesDto.BookReaderWritingStyle;
existingPreferences.BookThemeName = preferencesDto.BookReaderThemeName;
Expand Down
18 changes: 18 additions & 0 deletions API/DTOs/UserPreferencesDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ public class UserPreferencesDto
/// </summary>
[Required]
public bool BookReaderTapToPaginate { get; set; }

/// <summary>
/// Book Reader Option: Allows swiping across the screen to paginate
/// </summary>
[Required]
public bool BookReaderSwipeToPaginate { get; set; }
/// <summary>
/// Book Reader Option: Sets scroll threshold for swipe pagination
/// </summary>
public int BookReaderScrollThreshold { get; set; } = 30;
/// <summary>
/// Book Reader Option: Sets distance threshold for swipe pagination
/// </summary>
public int BookReaderDistanceThreshold { get; set; } = 30;
/// <summary>
/// Book Reader Option: Sets speed threshold for swipe pagination
/// </summary>
public double BookReaderSpeedThreshold { get; set; } = 50;
/// <summary>
/// Book Reader Option: What direction should the next/prev page buttons go
/// </summary>
Expand Down
Loading