mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-20 04:31:47 -05:00
remove some duplicated code
This commit is contained in:
parent
8c6df94739
commit
8488b55e09
@ -1507,18 +1507,14 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
toast.show();
|
toast.show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Intent intent = new Intent(this, ChooseFolder.class);
|
|
||||||
intent.putExtra(ChooseFolder.EXTRA_ACCOUNT, mAccount.getUuid());
|
startRefileActivity(ACTIVITY_CHOOSE_FOLDER_MOVE);
|
||||||
intent.putExtra(ChooseFolder.EXTRA_CUR_FOLDER, mMessageReference.folderName);
|
|
||||||
intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, mAccount.getLastSelectedFolderName());
|
|
||||||
intent.putExtra(ChooseFolder.EXTRA_MESSAGE, mMessageReference);
|
|
||||||
startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_MOVE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onCopy()
|
private void onCopy()
|
||||||
{
|
{
|
||||||
if ((!MessagingController.getInstance(getApplication()).isCopyCapable(mAccount))
|
if ((!MessagingController.getInstance(getApplication()).isCopyCapable(mAccount))
|
||||||
|| (mMessage == null))
|
|| (mMessage == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1528,18 +1524,27 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
toast.show();
|
toast.show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startRefileActivity(ACTIVITY_CHOOSE_FOLDER_COPY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startRefileActivity(int activity)
|
||||||
|
{
|
||||||
Intent intent = new Intent(this, ChooseFolder.class);
|
Intent intent = new Intent(this, ChooseFolder.class);
|
||||||
intent.putExtra(ChooseFolder.EXTRA_ACCOUNT, mAccount.getUuid());
|
intent.putExtra(ChooseFolder.EXTRA_ACCOUNT, mAccount.getUuid());
|
||||||
intent.putExtra(ChooseFolder.EXTRA_CUR_FOLDER, mMessageReference.folderName);
|
intent.putExtra(ChooseFolder.EXTRA_CUR_FOLDER, mMessageReference.folderName);
|
||||||
intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, mAccount.getLastSelectedFolderName());
|
intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, mAccount.getLastSelectedFolderName());
|
||||||
intent.putExtra(ChooseFolder.EXTRA_MESSAGE, mMessageReference);
|
intent.putExtra(ChooseFolder.EXTRA_MESSAGE, mMessageReference);
|
||||||
startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_COPY);
|
startActivityForResult(intent, activity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onShowAdditionalHeaders()
|
private void onShowAdditionalHeaders()
|
||||||
{
|
{
|
||||||
int currentVisibility = mAdditionalHeadersView.getVisibility();
|
int currentVisibility = mAdditionalHeadersView.getVisibility();
|
||||||
|
|
||||||
if (currentVisibility == View.VISIBLE)
|
if (currentVisibility == View.VISIBLE)
|
||||||
{
|
{
|
||||||
mHandler.hideAdditionalHeaders();
|
mHandler.hideAdditionalHeaders();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user