Search in sources :

Example 16 with AttachmentItem

use of forpdateam.ru.forpda.api.theme.editpost.models.AttachmentItem in project ForPDA by RadiationX.

the class AttachmentsPopup method onDeleteFiles.

public void onDeleteFiles(List<AttachmentItem> deletedItems) {
    // unblock ui
    Log.d(LOG_TAG, "onDeleteFiles " + deletedItems);
    for (AttachmentItem item : deletedItems) {
        Log.d(LOG_TAG, "Delete file " + item);
        messagePanel.setText(messagePanel.getMessage().replaceAll("\\[attachment=['\"]?" + item.getId() + ":[^\\]]*?]", ""));
    }
    progressOverlay.setVisibility(View.GONE);
    adapter.deleteSelected();
}
Also used : AttachmentItem(forpdateam.ru.forpda.api.theme.editpost.models.AttachmentItem)

Aggregations

AttachmentItem (forpdateam.ru.forpda.api.theme.editpost.models.AttachmentItem)16 NetworkResponse (forpdateam.ru.forpda.api.NetworkResponse)6 Matcher (java.util.regex.Matcher)6 NetworkRequest (forpdateam.ru.forpda.api.NetworkRequest)4 RequestFile (forpdateam.ru.forpda.api.RequestFile)4 ArrayList (java.util.ArrayList)3 EditPostForm (forpdateam.ru.forpda.api.theme.editpost.models.EditPostForm)2 EditPoll (forpdateam.ru.forpda.api.theme.editpost.models.EditPoll)1 ThemePage (forpdateam.ru.forpda.api.theme.models.ThemePage)1 CustomWebChromeClient (forpdateam.ru.forpda.common.webview.CustomWebChromeClient)1 CustomWebViewClient (forpdateam.ru.forpda.common.webview.CustomWebViewClient)1 TabFragment (forpdateam.ru.forpda.ui.fragments.TabFragment)1 ThemeFragment (forpdateam.ru.forpda.ui.fragments.theme.ThemeFragment)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 MessageDigest (java.security.MessageDigest)1 HashMap (java.util.HashMap)1 JSONObject (org.json.JSONObject)1