Skip to content

Commit

Permalink
Web: Add ch number to reader
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi311 committed Dec 16, 2024
1 parent 20ccec3 commit 1e2258f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tanoshi-schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tanoshi-schema"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
1 change: 1 addition & 0 deletions crates/tanoshi-schema/graphql/fetch_chapter.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
query FetchChapter($chapterId:Int) {
chapter(id: $chapterId) {
title
number
prev
next
source {
Expand Down
4 changes: 2 additions & 2 deletions crates/tanoshi-web/src/reader.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::rc::Rc;

use crate::common::{Fit, ReaderSettings, Spinner, events, snackbar};
use crate::utils::{document, proxied_image_url, window, AsyncLoader, body};
use crate::utils::{document, proxied_image_url, window, AsyncLoader, body, format_number_title};
use crate::{
common::{Background, Direction, DisplayMode, ReaderMode},
query,
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Reader {
Ok(result) => {
this.manga_id.set_neq(result.manga.id);
this.manga_title.set_neq(result.manga.title);
this.chapter_title.set_neq(result.title);
this.chapter_title.set_neq(format_number_title(result.number, &result.title));
this.next_chapter.set_neq(result.next);
this.prev_chapter.set_neq(result.prev);

Expand Down

0 comments on commit 1e2258f

Please sign in to comment.