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

Update icons - first batch #1730

Merged
merged 4 commits into from
Jul 30, 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
12 changes: 8 additions & 4 deletions NextcloudTalk/BaseChatTableViewCell+File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,17 @@ extension BaseChatTableViewCell {
}

func showFallbackIcon(for message: NCChatMessage) {
let imageName = "\(NCUtils.previewImage(forMimeType: message.file().mimetype))-chat-preview"
let imageName = NCUtils.previewImage(forMimeType: message.file().mimetype)

if let image = UIImage(named: imageName) {
self.filePreviewImageView?.image = image
let size = CGSize(width: fileMessageCellFileMaxPreviewWidth, height: fileMessageCellFileMaxPreviewHeight)

self.filePreviewImageViewHeightConstraint?.constant = image.size.height
self.filePreviewImageViewWidthConstraint?.constant = image.size.width
if let renderedImage = NCUtils.renderAspectImage(image: image, ofSize: size, centerImage: false) {
self.filePreviewImageView?.image = renderedImage

self.filePreviewImageViewHeightConstraint?.constant = renderedImage.size.height
self.filePreviewImageViewWidthConstraint?.constant = renderedImage.size.width
}
}

self.filePreviewActivityIndicator?.isHidden = true
Expand Down
2 changes: 1 addition & 1 deletion NextcloudTalk/DetailedOptionsSelectorTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"DetailOptionIdentifier"];

if (_type == DetailedOptionsSelectorTypeAccounts) {
[cell.imageView setImage:[NCUtils renderAspectImageWithImage:option.image of:CGSizeMake(20, 20)]];
[cell.imageView setImage:[NCUtils renderAspectImageWithImage:option.image ofSize:CGSizeMake(20, 20) centerImage:YES]];
[cell.detailTextLabel setText:[option.subtitle stringByReplacingOccurrencesOfString:@"https://" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [option.subtitle length])]];
[cell.detailTextLabel setTextColor:[UIColor secondaryLabelColor]];
} else {
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 8 additions & 16 deletions NextcloudTalk/Images.xcassets/file-audio.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "file-audio.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "file-audio@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "file-audio@3x.png",
"scale" : "3x"
"filename" : "file-audio.svg",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 5 additions & 13 deletions NextcloudTalk/Images.xcassets/file-document.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"images" : [
{
"filename" : "file-document.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "file-document@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "file-document@3x.png",
"idiom" : "universal",
"scale" : "3x"
"filename" : "file-document.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 8 additions & 16 deletions NextcloudTalk/Images.xcassets/file-image.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "file-image.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "file-image@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "file-image@3x.png",
"scale" : "3x"
"filename" : "file-image.svg",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Diff not rendered.
Diff not rendered.
24 changes: 8 additions & 16 deletions NextcloudTalk/Images.xcassets/file-pdf.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "file-pdf.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "file-pdf@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "file-pdf@3x.png",
"scale" : "3x"
"filename" : "file-pdf.svg",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
}
Diff not rendered.
3 changes: 3 additions & 0 deletions NextcloudTalk/Images.xcassets/file-pdf.imageset/file-pdf.svg
Diff not rendered.
Diff not rendered.

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "file-presentation.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "file-presentation@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "file-presentation@3x.png",
"scale" : "3x"
"filename" : "file-presentation.svg",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
}
Diff not rendered.
Diff not rendered.
Diff not rendered.

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading
Loading