Skip to content

Commit

Permalink
fix: commit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
kKaskak committed Jan 13, 2025
1 parent b37d3e8 commit 25a1065
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub const NOTIFICATION_ITEMS_COUNT: usize = 100;
pub const CALENDAR_ITEMS_COUNT: usize = 100;

/// Account age in days to be considered a new user
pub const NEW_USER_DAYS: i64 = 30;
pub const NEW_USER_DAYS: chrono::Duration = chrono::Duration::days(30);

/// A `LibraryItem` is considered watched once we've watched more than the `duration * threshold`:
///
Expand Down
4 changes: 1 addition & 3 deletions src/types/profile/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ pub struct User {
impl User {
pub fn is_new_user<E: Env + 'static>(&self) -> bool {
let now = E::now();
let one_month = Duration::days(NEW_USER_DAYS);

now.signed_duration_since(self.date_registered) < one_month
now.signed_duration_since(self.date_registered) < NEW_USER_DAYS
}
}
3 changes: 1 addition & 2 deletions stremio-core-web/src/model/serialize_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ mod model {
};
use url::Url;

use crate::env::WebEnv;
use crate::model::deep_links_ext::DeepLinksExt;
use crate::{env::WebEnv, model::deep_links_ext::DeepLinksExt};

#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
Expand Down

0 comments on commit 25a1065

Please sign in to comment.