forked from Keelrleek/SoulStream
community: declare what you like on soulseek, so the similar-users shelf finally has something to rank on
This commit is contained in:
1 parent
8093adc89e
commit
7b7f48ebc6
8 files changed
+5671
-5519
No files matched your search
@@ -625,6 +625,19 @@ impl Client {
|
||||
}
|
||||
}
|
||||
|
||||
/// Declare, or take back, one interest on the server. Fire and forget:
|
||||
/// the server sends nothing back, and reading our own interests is how you
|
||||
/// confirm it landed.
|
||||
pub fn declare_interest(&self, thing: &str, like: bool, on: bool) -> Result<()> {
|
||||
let msg = match (like, on) {
|
||||
(true, true) => server::add_thing_i_like(thing),
|
||||
(true, false) => server::remove_thing_i_like(thing),
|
||||
(false, true) => server::add_thing_i_hate(thing),
|
||||
(false, false) => server::remove_thing_i_hate(thing),
|
||||
};
|
||||
self.inner.send_server(msg)
|
||||
}
|
||||
|
||||
/// Users the server ranks as similar to us by shared interests. Spawn-shaped.
|
||||
pub fn similar_users(
|
||||
&self,
|
||||
|
||||
Reference in new issue
Block a user