mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #462 from NativeScript/nnikolov/CutenessImpovement
Cuteness now uses the first url with-in preview images.
This commit is contained in:
@ -79,7 +79,13 @@ export class RedditViewModel extends observable.Observable {
|
|||||||
|
|
||||||
get imageSource(): imageSource.ImageSource {
|
get imageSource(): imageSource.ImageSource {
|
||||||
if (this._source) {
|
if (this._source) {
|
||||||
var url = this._source.url;
|
var url;
|
||||||
|
try {
|
||||||
|
url = (<any>this._source).preview.images[0].source.url;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
url = this._source.url;
|
||||||
|
}
|
||||||
|
|
||||||
if (_isValidImageUrl(url)) {
|
if (_isValidImageUrl(url)) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user