Skip to content

Commit

Permalink
Fix lost of deprecated messages
Browse files Browse the repository at this point in the history
luigi311 committed Sep 3, 2024
1 parent 28f1898 commit bc21ac4
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -222,7 +222,7 @@ impl DownloadRepository for DownloadRepositoryImpl {
.bind(item.rank)
.bind(&item.url)
.bind(&item.priority)
.bind(item.date_added.timestamp())
.bind(item.date_added.and_utc().timestamp())
}

query.execute(&self.pool as &SqlitePool).await?;
6 changes: 3 additions & 3 deletions crates/tanoshi/src/presentation/graphql/downloads.rs
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ impl DownloadRoot {
.get_downloaded_chapters(
Utc::now().timestamp(),
1,
e.date_added.timestamp(),
e.date_added.and_utc().timestamp(),
e.id,
None,
Some(1),
@@ -117,7 +117,7 @@ impl DownloadRoot {
if let Some(e) = edges.last() {
has_next_page = !download_svc
.get_downloaded_chapters(
e.date_added.timestamp(),
e.date_added.and_utc().timestamp(),
e.id,
0,
0,
@@ -131,7 +131,7 @@ impl DownloadRoot {
let mut connection = Connection::new(has_previous_page, has_next_page);
connection.edges.extend(edges.into_iter().map(|e| {
Edge::new(
Cursor(e.uploaded.timestamp(), e.id),
Cursor(e.uploaded.and_utc().timestamp(), e.id),
Chapter {
id: e.id,
source_id: e.source_id,
12 changes: 6 additions & 6 deletions crates/tanoshi/src/presentation/graphql/library.rs
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ impl LibraryRoot {
claims.sub,
Utc::now().timestamp(),
1,
e.uploaded.timestamp(),
e.uploaded.and_utc().timestamp(),
e.chapter_id,
None,
Some(1),
@@ -111,7 +111,7 @@ impl LibraryRoot {
has_next_page = !library_svc
.get_library_recent_updates(
claims.sub,
e.uploaded.timestamp(),
e.uploaded.and_utc().timestamp(),
e.chapter_id,
0,
0,
@@ -126,7 +126,7 @@ impl LibraryRoot {
connection.edges.extend(
edges
.into_iter()
.map(|e| Edge::new(Cursor(e.uploaded.timestamp(), e.chapter_id), e.into())),
.map(|e| Edge::new(Cursor(e.uploaded.and_utc().timestamp(), e.chapter_id), e.into())),
);

Ok::<_, Error>(connection)
@@ -169,7 +169,7 @@ impl LibraryRoot {
.get_history_chapters(
claims.sub,
Utc::now().timestamp(),
e.read_at.timestamp(),
e.read_at.and_utc().timestamp(),
None,
Some(1),
)
@@ -181,7 +181,7 @@ impl LibraryRoot {
let mut has_next_page = false;
if let Some(e) = edges.last() {
has_next_page = !history_svc
.get_history_chapters(claims.sub, e.read_at.timestamp(), 0, Some(1), None)
.get_history_chapters(claims.sub, e.read_at.and_utc().timestamp(), 0, Some(1), None)
.await?
.is_empty();
}
@@ -190,7 +190,7 @@ impl LibraryRoot {
connection.edges.extend(
edges
.into_iter()
.map(|e| Edge::new(Cursor(e.read_at.timestamp(), e.manga_id), e.into())),
.map(|e| Edge::new(Cursor(e.read_at.and_utc().timestamp(), e.manga_id), e.into())),
);

Ok::<_, Error>(connection)
2 changes: 1 addition & 1 deletion crates/tanoshi/src/presentation/graphql/loader.rs
Original file line number Diff line number Diff line change
@@ -332,7 +332,7 @@ where
.await
.map_err(|e| Arc::new(anyhow::anyhow!("{e}")))?
.iter()
.group_by(|m| UserTrackerMangaId(user_id, m.manga_id))
.chunk_by(|m| UserTrackerMangaId(user_id, m.manga_id))
.into_iter()
.map(|(key, group)| {
(

0 comments on commit bc21ac4

Please sign in to comment.