private void PostComment(Activity activity)
 {
     demoController.PushMenuSection <PostActivitySection>(section =>
     {
         section.Target = PostActivityTarget.Comment(activity.Id);
     });
 }
 private void PostTo(Topic topic)
 {
     demoController.PushMenuSection <PostActivitySection>(section =>
     {
         section.Target = PostActivityTarget.Topic(topic.Id);
     });
 }
Exemplo n.º 3
0
 void DrawMainView()
 {
     GUILayout.Label("API", GSStyles.NormalLabelText);
     if (GetSocial.IsInitialized)
     {
         Button("User Management", ShowMenuSection <AuthSection>);
     }
     else
     {
         Button("Init with anonymous", () => GetSocial.Init());
         if (_enterIdentityData)
         {
             DemoGuiUtils.DrawRow(() =>
             {
                 _identityId    = GUILayout.TextField(_identityId, GSStyles.TextField);
                 _identityToken = GUILayout.TextField(_identityToken, GSStyles.TextField);
             });
             DemoGuiUtils.DrawRow(() =>
             {
                 Button("Init", InitWithCustom);
                 Button("Cancel", () => { _enterIdentityData = false; });
             });
         }
         else
         {
             Button("Init with custom identity", () => { _enterIdentityData = true; });
         }
         Button("Init with FB", InitWithFacebook);
     }
     Button("InApp Purchase Api", ShowMenuSection <InAppPurchaseApiSection>);
     Button("Promo Codes", ShowMenuSection <PromoCodesSection>);
     Button("Custom Analytics Events", ShowMenuSection <CustomAnalyticsEventSection>);
     GUILayout.Space(30f);
     GUILayout.Label("Invites", GSStyles.NormalLabelText);
     Button("Smart Invites", ShowMenuSection <SmartInvitesApiSection>);
     Button("Set Referrer", ShowMenuSection <SetReferrerSection>);
     Button("Referred Users", ShowMenuSection <ReferredUsersSection>);
     Button("Referrer Users", ShowMenuSection <ReferrerUsersSection>);
     GUILayout.Space(30f);
     GUILayout.Label("Notification", GSStyles.NormalLabelText);
     Button("Send Notification", ShowMenuSection <SendNotificationSection>);
     Button("Notifications", ShowMenuSection <NotificationsSection>);
     GUILayout.Space(30f);
     GUILayout.Label("Communities", GSStyles.NormalLabelText);
     Button("Timeline", () => PushMenuSection <ActivitiesSection>(section => section.Query = ActivitiesQuery.Timeline()));
     Button("Find Tags", ShowMenuSection <TagsSection>);
     Button("Post to Timeline", () => PushMenuSection <PostActivitySection>(section => section.Target = PostActivityTarget.Timeline()));
     Button("My Friends", () => PushMenuSection <FriendsSection>(section => section.User = UserId.CurrentUser()));
     Button("Suggested Friends", ShowMenuSection <SuggestedFriendsSection>);
     Button("My Followers", () => PushMenuSection <FollowersSection>(section =>
     {
         section.Name  = "Me";
         section.Query = FollowersQuery.OfUser(UserId.CurrentUser());
     }));
     Button("Followed By Me", () => PushMenuSection <FollowingSection>(section =>
     {
         section.Name = "Me";
         section.User = UserId.CurrentUser();
     }));
     Button("Search Topics", ShowMenuSection <TopicsSearchSection>);
     Button("My Topics", () => PushMenuSection <FollowedTopicsSection>(section =>
     {
         section.User = UserId.CurrentUser();
     }));
     Button("Search Users", ShowMenuSection <UsersSearchSection>);
     GUILayout.Space(30f);
     GUILayout.Label("UI", GSStyles.NormalLabelText);
     Button("Activity Feed", ShowMenuSection <ActivityFeedUiSection>);
     Button("Notification Center", ShowMenuSection <NotificationUiSection>);
     Button("UI Customization", ShowMenuSection <UiCustomizationSection>);
     GUILayout.Space(30f);
     GUILayout.Label("Other", GSStyles.NormalLabelText);
     DrawSettings();
 }