Removed some unused code

This commit is contained in:
Zorica Stojchevska 2021-09-08 09:44:57 +02:00 committed by Zorica Stojchevska
parent ab3f812c56
commit 2034e02e0f
3 changed files with 0 additions and 12 deletions

View File

@ -67,8 +67,6 @@ import ch.protonmail.android.attachments.AttachmentsViewState;
import ch.protonmail.android.attachments.ImportAttachmentsWorker;
import ch.protonmail.android.core.Constants;
import ch.protonmail.android.core.ProtonMailApplication;
import ch.protonmail.android.data.local.MessageDao;
import ch.protonmail.android.data.local.MessageDatabase;
import ch.protonmail.android.data.local.model.Attachment;
import ch.protonmail.android.data.local.model.LocalAttachment;
import ch.protonmail.android.events.DownloadedAttachmentEvent;
@ -97,8 +95,6 @@ public class AddAttachmentsActivity extends BaseStoragePermissionActivity implem
private static final int REQUEST_CODE_TAKE_PHOTO = 2;
private static final String STATE_PHOTO_PATH = "STATE_PATH_TO_PHOTO";
private MessageDao messageDao;
private AttachmentListAdapter mAdapter;
@BindView(R.id.progress_layout)
View mProgressLayout;
@ -195,7 +191,6 @@ public class AddAttachmentsActivity extends BaseStoragePermissionActivity implem
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
messageDao = MessageDatabase.Factory.getInstance(getApplicationContext(), mUserManager.requireCurrentUserId()).getDao();
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {

View File

@ -165,9 +165,6 @@ class MessageDetailsRepository @Inject constructor(
suspend fun saveAttachment(attachment: Attachment) = messagesDao.saveAttachment(attachment)
@Deprecated("Use suspend function", ReplaceWith("saveAttachment(attachment)"))
fun saveAttachmentBlocking(attachment: Attachment) = messagesDao.saveAttachmentBlocking(attachment)
suspend fun saveMessage(message: Message): Long {
saveFile(message)
return messagesDao.saveMessage(message)

View File

@ -346,10 +346,6 @@ abstract class MessageDao : BaseDao<Message>() {
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract suspend fun saveAttachment(attachment: Attachment): Long
@Deprecated("Use suspend abstract function", ReplaceWith("saveAttachment(attachment)"))
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract fun saveAttachmentBlocking(attachment: Attachment): Long
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract suspend fun saveAllAttachments(attachments: List<Attachment>): List<Long>