re-introduce (simplified) dark theme
ask confirmation message before permanently deleting entries (when no recycle bin is present)
This commit is contained in:
@@ -43,7 +43,7 @@ namespace keepass2android
|
||||
}
|
||||
}
|
||||
|
||||
protected override UiStringKey QuestionsResourceId
|
||||
protected override UiStringKey QuestionRecycleResourceId
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -51,6 +51,14 @@ namespace keepass2android
|
||||
}
|
||||
}
|
||||
|
||||
protected override UiStringKey QuestionNoRecycleResourceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return UiStringKey.AskDeletePermanentlyEntryNoRecycle;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
|
||||
{
|
||||
DoDeleteEntry(_entry, touchedGroups);
|
||||
|
||||
@@ -61,14 +61,19 @@ namespace keepass2android
|
||||
}
|
||||
}
|
||||
|
||||
protected override UiStringKey QuestionsResourceId
|
||||
protected override UiStringKey QuestionRecycleResourceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return UiStringKey.AskDeletePermanentlyGroup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override UiStringKey QuestionNoRecycleResourceId
|
||||
{
|
||||
get { return UiStringKey.AskDeletePermanentlyGroupNoRecycle; }
|
||||
}
|
||||
|
||||
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
|
||||
{
|
||||
DoDeleteGroup(_group, touchedGroups, permanentlyDeletedGroups);
|
||||
|
||||
@@ -50,11 +50,16 @@ namespace keepass2android
|
||||
get { return _canRecycle; }
|
||||
}
|
||||
|
||||
protected override UiStringKey QuestionsResourceId
|
||||
protected override UiStringKey QuestionRecycleResourceId
|
||||
{
|
||||
get { return UiStringKey.AskDeletePermanentlyItems; }
|
||||
}
|
||||
|
||||
protected override UiStringKey QuestionNoRecycleResourceId
|
||||
{
|
||||
get { return UiStringKey.AskDeletePermanentlyItemsNoRecycle; }
|
||||
}
|
||||
|
||||
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
|
||||
{
|
||||
foreach (var g in _elementsToDelete.OfType<PwGroup>())
|
||||
|
||||
@@ -107,17 +107,23 @@ namespace keepass2android
|
||||
else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.Equals(Db.KpDatabase.RecycleBinUuid)); }
|
||||
}
|
||||
|
||||
protected abstract UiStringKey QuestionsResourceId
|
||||
protected abstract UiStringKey QuestionRecycleResourceId
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
protected abstract UiStringKey QuestionNoRecycleResourceId
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (CanRecycle)
|
||||
{
|
||||
App.AskYesNoCancel(UiStringKey.AskDeletePermanently_title,
|
||||
QuestionsResourceId,
|
||||
QuestionRecycleResourceId,
|
||||
(dlgSender, dlgEvt) =>
|
||||
{
|
||||
DeletePermanently = true;
|
||||
@@ -138,11 +144,22 @@ namespace keepass2android
|
||||
}
|
||||
else
|
||||
{
|
||||
ProgressTask pt = new ProgressTask(App, Ctx, this);
|
||||
pt.Run();
|
||||
App.AskYesNoCancel(UiStringKey.AskDeletePermanently_title,
|
||||
QuestionNoRecycleResourceId,
|
||||
(dlgSender, dlgEvt) =>
|
||||
{
|
||||
ProgressTask pt = new ProgressTask(App, Ctx, this);
|
||||
pt.Run();
|
||||
},
|
||||
null,
|
||||
(dlgSender, dlgEvt) => { },
|
||||
Ctx);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void DoDeleteEntry(PwEntry pe, List<PwGroup> touchedGroups)
|
||||
{
|
||||
PwDatabase pd = Db.KpDatabase;
|
||||
|
||||
Reference in New Issue
Block a user