Skip to content

Commit

Permalink
share only url
Browse files Browse the repository at this point in the history
  • Loading branch information
bastyen committed Mar 10, 2020
1 parent 52eb853 commit ffddc8a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/app/pages/trek-details/trek-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,10 @@ export class TrekDetailsPage extends UnSubscribe implements OnInit, OnDestroy {

public shareTrek(): void {
if (this.platform.is('ios') || this.platform.is('android')) {
const shareWithImg: string | undefined =
this.currentTrek.properties.pictures &&
this.currentTrek.properties.pictures.length > 0
? this.currentTrek.properties.pictures[0].url
: undefined;
const onlineUrl = this.baseUrl.replace('mobile', '');
const sharingOptions = {
message: this.currentTrek.properties.name,
subject: environment.appName,
files: shareWithImg
? [
`${onlineUrl}${shareWithImg.slice(
shareWithImg.indexOf('media'),
shareWithImg.length
)}`
]
: [],
url: `${onlineUrl}${this.currentTrek.properties.practice.slug}/${this.currentTrek.properties.slug}/`
};
this.socialSharing.shareWithOptions(sharingOptions).then(() => {
Expand Down

0 comments on commit ffddc8a

Please sign in to comment.