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: Update watchers #11

Merged
merged 6 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["tui", "atproto", "bluesky", "atrium"]
exclude = ["/config"]

[dependencies]
bsky-sdk = "0.1.4"
bsky-sdk = "0.1.5"
chrono = { version = "0.4.38", default-features = false }
clap = { version = "4.5.8", features = ["derive"] }
color-eyre = "0.6.3"
Expand Down
6 changes: 5 additions & 1 deletion config/tuisky.config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@
"type": "integer",
"minimum": 1
},
"feed_view_posts": {
"feed": {
"type": "integer",
"minimum": 1
},
"post_thread": {
"type": "integer",
"minimum": 1
}
Expand Down
5 changes: 2 additions & 3 deletions src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pub mod config;
mod post_thread;
pub mod types;
mod watch;
mod watches;

pub use post_thread::PostThreadWatcher;
pub use watch::Watcher;
pub use watch::{Watch, Watcher};
6 changes: 3 additions & 3 deletions src/backend/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ pub struct Config {
#[serde(default)]
pub struct Intervals {
pub preferences: u64,
pub feed_view_posts: u64,
pub feed: u64,
pub post_thread: u64,
}

impl Default for Intervals {
fn default() -> Self {
Self {
preferences: 60,
feed_view_posts: 30,
preferences: 600,
feed: 30,
post_thread: 60,
}
}
Expand Down
125 changes: 0 additions & 125 deletions src/backend/post_thread.rs

This file was deleted.

4 changes: 2 additions & 2 deletions src/backend/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use bsky_sdk::api::app::bsky::feed::defs::GeneratorView;
#[derive(Debug, Clone)]
pub struct SavedFeed {
pub pinned: bool,
pub value: SavedFeedValue,
pub value: FeedDescriptor,
}

#[derive(Debug, Clone)]
pub enum SavedFeedValue {
pub enum FeedDescriptor {
Feed(Box<GeneratorView>),
List, // TODO
Timeline(String),
Expand Down
Loading