mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 05:38:12 +00:00
Add attachment_views_test.js tests
This commit is contained in:
@@ -90,19 +90,22 @@
|
||||
this.saveFile();
|
||||
}
|
||||
},
|
||||
saveFile: function() {
|
||||
var blob = this.blob;
|
||||
var suggestedName = 'signal';
|
||||
suggestedName: function() {
|
||||
var suggestion = 'signal';
|
||||
if (this.timestamp) {
|
||||
suggestedName += moment(this.timestamp).format('-YYYY-MM-DD-HHmmss');
|
||||
suggestion += moment(this.timestamp).format('-YYYY-MM-DD-HHmmss');
|
||||
}
|
||||
if (this.fileType) {
|
||||
suggestedName += '.' + this.fileType;
|
||||
suggestion += '.' + this.fileType;
|
||||
}
|
||||
return suggestion;
|
||||
},
|
||||
saveFile: function() {
|
||||
var blob = this.blob;
|
||||
var w = extension.windows.getViews()[0];
|
||||
if (w && w.chrome && w.chrome.fileSystem) {
|
||||
w.chrome.fileSystem.chooseEntry({
|
||||
type: 'saveFile', suggestedName: suggestedName
|
||||
type: 'saveFile', suggestedName: this.suggestedName()
|
||||
}, function(entry) {
|
||||
if (!entry) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user