Browse Source

Transaction History subject fixes

master
preyearegmi 6 years ago
parent
commit
fcdaecfa5e
  1. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/presenter/TransactionHistoryV2Presenter.java
  2. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/presenter/TransactionHistoryV2PresenterInterface.java
  3. 76
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/view/TransactionFragmentV2.java

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/presenter/TransactionHistoryV2Presenter.java

@ -45,7 +45,6 @@ public class TransactionHistoryV2Presenter extends BasePresenter implements Tran
.doFinally(()->view.showProgressBar(false,"")) .doFinally(()->view.showProgressBar(false,""))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.flatMap(response->{ .flatMap(response->{
if(response.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) if(response.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2))
{ {
List<TransactionHistoryItemModel> deliveredData=new ArrayList<>(); List<TransactionHistoryItemModel> deliveredData=new ArrayList<>();
@ -70,10 +69,7 @@ public class TransactionHistoryV2Presenter extends BasePresenter implements Tran
.subscribe(new TransactionHistoryObserver()); .subscribe(new TransactionHistoryObserver());
} }
@Override
public void getTransactionHistoryDummy(String startDate, String endDate) {
}
@Override @Override
public Observable<TransactionHistory> subscribeToTransactionHistoryFetchinEvent() { public Observable<TransactionHistory> subscribeToTransactionHistoryFetchinEvent() {

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/presenter/TransactionHistoryV2PresenterInterface.java

@ -23,7 +23,6 @@ public interface TransactionHistoryV2PresenterInterface extends BasePresenterInt
void getTransactionHistory(String startDate,String endDate); void getTransactionHistory(String startDate,String endDate);
void getTransactionHistoryDummy(String startDate,String endDate);
Observable<TransactionHistoryV2Presenter.TransactionHistory> subscribeToTransactionHistoryFetchinEvent(); Observable<TransactionHistoryV2Presenter.TransactionHistory> subscribeToTransactionHistoryFetchinEvent();

76
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionhistoryV2/view/TransactionFragmentV2.java

@ -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();
}
});
});
}
} }
} }
} }
Loading…
Cancel
Save