Untitled
unknown
plain_text
5 months ago
2.5 kB
4
Indexable
private void setupNetcoreAppInbox() { SmartechAppInbox smartechAppInbox = SmartechAppInbox.getInstance(new WeakReference<>(mContext)); List<String> categoryList = new ArrayList<>(); for (SMTInboxCategory category : smartechAppInbox.getAppInboxCategoryList()) { categoryList.add(category.getName()); } SMTAppInboxRequestBuilder builder = new SMTAppInboxRequestBuilder.Builder(SMTInboxDataType.ALL) .setCallback(new SMTInboxCallback() { @Override public void onInboxProgress() { //mContext.runOnUiThread(() -> showProgressBar()); } @Override public void onInboxSuccess(@Nullable List<SMTInboxMessageData> list) { Log.v("APP inboxDATA", list.toString()); // inboxBaseDaoListDefault.clear(); /*if (list != null && !list.isEmpty()) { List<InboxBaseDao> mAppNetcoreInboxList = new ArrayList<>(); for (SMTInboxMessageData itemDao : list) { NetcoreInboxDao inboxDao = new NetcoreInboxDao(itemDao); mAppNetcoreInboxList.add(inboxDao); } try { Collections.sort(mAppNetcoreInboxList); } catch (Exception e) { EMTLog.e("issue with sort : " + e.getMessage(), e); } inboxBaseDaoListDefault.addAll(mAppNetcoreInboxList); }*/ /* mContext.runOnUiThread(() -> { hideProgressBar(); if (inboxBaseDaoListDefault.isEmpty()) { setErrorMsg(getString(R.string.msg_empty_notifications_list)); } else { filterInboxList(); notifyNotificationSetChanged(); } });*/ } @Override public void onInboxFail() { // mContext.runOnUiThread(() -> hideProgressBar()); } }) .setCategory(categoryList).setLimit(10).build(); smartechAppInbox.getAppInboxMessages(builder); }
Editor is loading...
Leave a Comment