Пример #1
0
 public static object reportItem(string itemId, string itemType, string reportContext)
 {
     return(new ThunkAction <AppState>((dispatcher, getState) => {
         return ReportApi.ReportItem(itemId, itemType, reportContext)
         .Then(() => {
             dispatcher.dispatch(new MainNavigatorPopAction());
             CustomDialogUtils.showToast("举报成功", Icons.sentiment_satisfied);
             dispatcher.dispatch(new ReportItemSuccessAction());
         })
         .Catch(error => {
             CustomDialogUtils.showToast("举报失败", Icons.sentiment_dissatisfied);
             dispatcher.dispatch(new ReportItemFailureAction());
             Debug.Log(error);
         });
     }));
 }