Skip to content

Commit

Permalink
feat: thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
nuomi1 committed Jan 24, 2021
1 parent 1c42fc6 commit 945187c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Example/NBus/Model/MediaSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ enum MediaSource {
let title = "iPhone"
let description = "Apple"

let dataAsset = NSDataAsset(name: "giphy-J1ZajKJKzD0PK")!
let data = dataAsset.data
let thumbnail = UIImage(data: data)?.jpegData(compressionQuality: 0.2)

return Messages.webPage(
link: url,
title: title,
description: description
description: description,
thumbnail: thumbnail
)
}()

Expand Down

0 comments on commit 945187c

Please sign in to comment.