Skip to content

Commit

Permalink
chore: fix ttl unresolved for ra
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfhsjfh committed Feb 7, 2025
1 parent cbffc51 commit c64f644
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
1 change: 1 addition & 0 deletions phira/src/charts_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
page::{ChartItem, ChartType, Fader, Illustration},
save_data,
scene::{render_release_to_refresh, SongScene, MP_PANEL},
ttl,
};
use anyhow::Result;
use macroquad::prelude::*;
Expand Down
1 change: 1 addition & 0 deletions phira/src/client/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use super::{basic_client_builder, Client, API_URL, CLIENT_TOKEN};
use crate::{
dir, get_data,
images::{THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH},
ttl,
};
use anyhow::{bail, Result};
use bytes::Bytes;
Expand Down
1 change: 1 addition & 0 deletions phira/src/page/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::{
client::{Client, Event},
icons::Icons,
scene::EventScene,
ttl,
};
use anyhow::Result;
use macroquad::prelude::*;
Expand Down
3 changes: 2 additions & 1 deletion phira/src/page/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use crate::{
scene::{check_read_tos_and_policy, ProfileScene, JUST_LOADED_TOS},
sync_data,
threed::ThreeD,
ttl,
};
use prpr_l10n::LANG_IDENTS;
use ::rand::{random, thread_rng, Rng};
use anyhow::{bail, Context, Result};
use chrono::NaiveDate;
Expand All @@ -29,6 +29,7 @@ use prpr::{
task::Task,
ui::{button_hit_large, clip_rounded_rect, ClipType, DRectButton, Dialog, FontArc, RectButton, Scroll, Ui},
};
use prpr_l10n::LANG_IDENTS;
use reqwest::StatusCode;
use serde::Deserialize;
use std::{
Expand Down
20 changes: 9 additions & 11 deletions phira/src/page/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::{
scene::{check_read_tos_and_policy, ChartOrder, JUST_LOADED_TOS, ORDERS},
tabs::{Tabs, TitleFn},
tags::TagsDialog,
ttl,
};
use anyhow::{anyhow, Result};
use macroquad::prelude::*;
Expand Down Expand Up @@ -242,11 +243,13 @@ impl LibraryPage {
let search = self.search_str.clone();
let mut charts = Vec::new();
charts.push(ChartDisplayItem::new(None, None));
charts.append(&mut s.charts_local
.iter()
.filter(|it| it.info.name.contains(&search))
.map(|it| ChartDisplayItem::new(Some(it.clone()), None))
.collect::<Vec<ChartDisplayItem>>()
charts.append(
&mut s
.charts_local
.iter()
.filter(|it| it.info.name.contains(&search))
.map(|it| ChartDisplayItem::new(Some(it.clone()), None))
.collect::<Vec<ChartDisplayItem>>(),
);
list.view.set(s.t, charts);
}
Expand Down Expand Up @@ -504,12 +507,7 @@ impl Page for LibraryPage {
self.import_btn.render_shadow(ui, r, t, |ui, path| {
ui.fill_path(&path, semi_black(0.4));
});
ui.text(tl!("import"))
.pos(ct.x, ct.y)
.anchor(0.5, 0.5)
.no_baseline()
.size(0.6)
.draw();
ui.text(tl!("import")).pos(ct.x, ct.y).anchor(0.5, 0.5).no_baseline().size(0.6).draw();
} else {
self.order_btn.render_shadow(ui, r, t, |ui, path| {
ui.fill_path(&path, semi_black(0.4));
Expand Down
1 change: 1 addition & 0 deletions phira/src/page/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
scene::BGM_VOLUME_UPDATED,
sync_data,
tabs::{Tabs, TitleFn},
ttl,
};
use anyhow::Result;
use bytesize::ByteSize;
Expand Down
2 changes: 1 addition & 1 deletion phira/src/scene/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
client::{recv_raw, Client, Record, User, UserManager},
get_data, get_data_mut,
page::{Fader, Illustration, SFader},
save_data, sync_data,
save_data, sync_data, ttl,
};
use anyhow::Result;
use chrono::Local;
Expand Down
5 changes: 3 additions & 2 deletions phira/src/scene/song.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use crate::{
rate::RateDialog,
save_data,
tags::TagsDialog,
ttl,
};
use ::rand::{thread_rng, Rng};
use anyhow::{anyhow, bail, Context, Result};
Expand Down Expand Up @@ -917,8 +918,8 @@ impl SongScene {
{
warn!("this build does not support unlock video.");
LoadingScene::new(mode, info, config, fs, player, upload_fn, update_fn, Some(preload))
.await
.map(|it| NextScene::Overlay(Box::new(it)))
.await
.map(|it| NextScene::Overlay(Box::new(it)))
}
#[cfg(feature = "video")]
{
Expand Down

0 comments on commit c64f644

Please sign in to comment.