mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
feat(updater): add body and date getters (#3802)
This commit is contained in:
committed by
GitHub
parent
b14aa89673
commit
c7696f34ec
5
.changes/update-response-methods.md
Normal file
5
.changes/update-response-methods.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Added `UpdateResponse::body` and `UpdateResponse::date`.
|
||||
@@ -637,6 +637,16 @@ impl<R: Runtime> UpdateResponse<R> {
|
||||
&self.update.version
|
||||
}
|
||||
|
||||
/// The update date.
|
||||
pub fn date(&self) -> &str {
|
||||
&self.update.date
|
||||
}
|
||||
|
||||
/// The update description.
|
||||
pub fn body(&self) -> Option<&String> {
|
||||
self.update.body.as_ref()
|
||||
}
|
||||
|
||||
/// Downloads and installs the update.
|
||||
pub async fn download_and_install(self) -> Result<()> {
|
||||
download_and_install(self.update).await
|
||||
|
||||
Reference in New Issue
Block a user