/*
 * Copyright 2016 Peter Kenji Yamanaka
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.pyamsoft.pydroid.social;

import com.pyamsoft.pydroid.base.PresenterImpl;

public final class SocialMediaPresenterImpl extends PresenterImpl<SocialMediaPresenter.SocialMediaView>
    implements SocialMediaPresenter {

  @Override public void clickAppPage(String link) {
    final SocialMediaView mediaView = get();
    final String fullLink = "market://details?id=" + link;
    mediaView.onAppPageClicked(fullLink);
  }

  @Override public void clickGooglePlay() {
    final SocialMediaView mediaView = get();
    final String link = "https://play.google.com/store/apps/dev?id=5257476342110165153";
    mediaView.onGooglePlayClicked(link);
  }

  @Override public void clickGooglePlus() {
    final SocialMediaView mediaView = get();
    final String link = "https://plus.google.com/+Pyamsoft-officialBlogspot/posts";
    mediaView.onGooglePlusClicked(link);
  }

  @Override public void clickBlogger() {
    final SocialMediaView mediaView = get();
    final String link = "http://pyamsoft.blogspot.com/";
    mediaView.onBloggerClicked(link);
  }

  @Override public void clickFacebook() {
    final SocialMediaView mediaView = get();
    final String link = "https://www.facebook.com/pyamsoftware";
    mediaView.onFacebookClicked(link);
  }
}

@@ -728,16 +728,20 @@
 nterImpl
+%0A   
  extends
@@ -792,20 +792,16 @@
 diaView%3E
-%0A   
  impleme
@@ -913,36 +913,71 @@
  mediaView = get
+View
 ();%0A
+    if (mediaView != null) %7B%0A  
     final String
@@ -1019,24 +1019,26 @@
 + link;%0A    
+  
 mediaView.on
@@ -1059,24 +1059,30 @@
 (fullLink);%0A
+    %7D%0A
   %7D%0A%0A  @Over
@@ -1151,36 +1151,71 @@
  mediaView = get
+View
 ();%0A
+    if (mediaView != null) %7B%0A  
     final String
@@ -1287,24 +1287,26 @@
 65153%22;%0A    
+  
 mediaView.on
@@ -1322,32 +1322,38 @@
 yClicked(link);%0A
+    %7D%0A
   %7D%0A%0A  @Override
@@ -1418,36 +1418,71 @@
  mediaView = get
+View
 ();%0A
+    if (mediaView != null) %7B%0A  
     final String
@@ -1549,24 +1549,26 @@
 posts%22;%0A    
+  
 mediaView.on
@@ -1584,32 +1584,38 @@
 sClicked(link);%0A
+    %7D%0A
   %7D%0A%0A  @Override
@@ -1677,36 +1677,71 @@
  mediaView = get
+View
 ();%0A
+    if (mediaView != null) %7B%0A  
     final String
@@ -1781,24 +1781,26 @@
 .com/%22;%0A    
+  
 mediaView.on
@@ -1817,24 +1817,30 @@
 cked(link);%0A
+    %7D%0A
   %7D%0A%0A  @Over
@@ -1915,20 +1915,55 @@
 ew = get
+View
 ();%0A
+    if (mediaView != null) %7B%0A  
     fina
@@ -2019,24 +2019,26 @@
 tware%22;%0A    
+  
 mediaView.on
@@ -2060,14 +2060,20 @@
 (link);%0A
+    %7D%0A
   %7D%0A%7D%0A

Fix social media presenter