|
@ -181,33 +181,73 @@ public class TransactionFragmentV2 extends BaseFragment implements View.OnClickL |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void onSuccess(List<TransactionHistoryItemModel> transactionHistoryItemModels) { |
|
|
protected void onSuccess(List<TransactionHistoryItemModel> transactionHistoryItemModels) { |
|
|
if(transactionHistoryItemModels==null||transactionHistoryItemModels.size()<1) |
|
|
|
|
|
showTransactionNotFoundView(true); |
|
|
|
|
|
else { |
|
|
|
|
|
showTransactionNotFoundView(false); |
|
|
|
|
|
data = transactionHistoryItemModels; |
|
|
|
|
|
transactionHistoryRVAdapter.setData(transactionHistoryItemModels); |
|
|
|
|
|
|
|
|
if(isUIReady()) { |
|
|
|
|
|
if (transactionHistoryItemModels == null || transactionHistoryItemModels.size() < 1) |
|
|
|
|
|
showTransactionNotFoundView(true); |
|
|
|
|
|
else { |
|
|
|
|
|
showTransactionNotFoundView(false); |
|
|
|
|
|
data = transactionHistoryItemModels; |
|
|
|
|
|
transactionHistoryRVAdapter.setData(transactionHistoryItemModels); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
scheduleTaskLater(()->{ |
|
|
|
|
|
if (transactionHistoryItemModels == null || transactionHistoryItemModels.size() < 1) |
|
|
|
|
|
showTransactionNotFoundView(true); |
|
|
|
|
|
else { |
|
|
|
|
|
showTransactionNotFoundView(false); |
|
|
|
|
|
data = transactionHistoryItemModels; |
|
|
|
|
|
transactionHistoryRVAdapter.setData(transactionHistoryItemModels); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void onFailed(String message) { |
|
|
public void onFailed(String message) { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
// getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if(isUIReady()) { |
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
scheduleTaskLater(()->{ |
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
// getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if(isUIReady()) { |
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
scheduleTaskLater(()->{ |
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
getActivity().finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |