mirror of
https://github.com/YGGverse/btracker-gemini.git
synced 2026-04-02 01:55:35 +00:00
add nothing text on empty result
This commit is contained in:
parent
20d9a5e573
commit
ea47c33e5a
1 changed files with 21 additions and 17 deletions
|
|
@ -279,6 +279,9 @@ fn list(
|
||||||
|
|
||||||
b.push("## Recent\n".into());
|
b.push("## Recent\n".into());
|
||||||
|
|
||||||
|
if torrents.is_empty() {
|
||||||
|
b.push("Nothing.\n".into())
|
||||||
|
} else {
|
||||||
for torrent in torrents {
|
for torrent in torrents {
|
||||||
let i: TorrentMetaV1Owned = torrent_from_bytes(&torrent.bytes)?;
|
let i: TorrentMetaV1Owned = torrent_from_bytes(&torrent.bytes)?;
|
||||||
b.push(format!(
|
b.push(format!(
|
||||||
|
|
@ -297,6 +300,7 @@ fn list(
|
||||||
format::files(&i),
|
format::files(&i),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
b.push("## Navigation\n".into());
|
b.push("## Navigation\n".into());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue