Skip to content

Commit 4432241

Browse files
committed
Issues
1 parent e020336 commit 4432241

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Runtime/Ui/ViewStack/Instructions/HideInstruction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class HideInstruction : Instruction
1515
private readonly IUiFrame frame;
1616
private readonly IKeyValueRepository<Type, IViewStackEntry> entriesRepository;
1717
private readonly ISingleRepository<IViewContext> currentContextRepository;
18-
private readonly Queue<Type> viewStackQueue;
18+
private readonly Stack<Type> viewStackQueue;
1919
private readonly Type entryId;
2020
private readonly bool pushToViewQueue;
2121
private readonly bool instantly;
@@ -24,7 +24,7 @@ public HideInstruction(
2424
IUiFrame frame,
2525
IKeyValueRepository<Type, IViewStackEntry> entriesRepository,
2626
ISingleRepository<IViewContext> currentContextRepository,
27-
Queue<Type> viewStackQueue,
27+
Stack<Type> viewStackQueue,
2828
Type entryId,
2929
bool pushToViewQueue,
3030
bool instantly
@@ -110,7 +110,7 @@ private Task HandleNonPopup(IViewContext context, CancellationToken cancellation
110110

111111
if (pushToViewQueue)
112112
{
113-
viewStackQueue.Enqueue(entryId);
113+
viewStackQueue.Push(entryId);
114114
}
115115

116116
return Task.WhenAll(hideTasks);

Runtime/Ui/ViewStack/Instructions/ShowLastInstruction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ public class ShowLastInstruction : Instruction
1515
private readonly IUiFrame frame;
1616
private readonly IKeyValueRepository<Type, IViewStackEntry> entriesRepository;
1717
private readonly ISingleRepository<IViewContext> currentContextRepository;
18-
private readonly Queue<Type> viewStackQueue;
18+
private readonly Stack<Type> viewStackQueue;
1919
private readonly bool behindForeground;
2020
private readonly bool instantly;
2121

2222
public ShowLastInstruction(
2323
IUiFrame frame,
2424
IKeyValueRepository<Type, IViewStackEntry> entriesRepository,
2525
ISingleRepository<IViewContext> currentContextRepository,
26-
Queue<Type> viewStackQueue,
26+
Stack<Type> viewStackQueue,
2727
bool behindForeground,
2828
bool instantly
2929
)
@@ -45,7 +45,7 @@ protected async override Task OnExecute(CancellationToken cancellationToken)
4545
return;
4646
}
4747

48-
Type entryId = viewStackQueue.Dequeue();
48+
Type entryId = viewStackQueue.Pop();
4949

5050
bool found = entriesRepository.TryGet(entryId, out IViewStackEntry entry);
5151

Runtime/Ui/ViewStack/Sequences/ViewStackSequenceBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ public class ViewStackSequenceBuilder : IViewStackSequenceBuilder
1818
private readonly IUiFrame frame;
1919
private readonly IKeyValueRepository<Type, IViewStackEntry> entriesRepository;
2020
private readonly ISingleRepository<IViewContext> currentContextRepository;
21-
private readonly Queue<Type> viewStackQueue;
21+
private readonly Stack<Type> viewStackQueue;
2222
private readonly ISequencer sequencer;
2323

2424
public ViewStackSequenceBuilder(
2525
IUiFrame frame,
2626
IKeyValueRepository<Type, IViewStackEntry> entriesRepository,
2727
ISingleRepository<IViewContext> currentContextRepository,
28-
Queue<Type> viewStackQueue,
28+
Stack<Type> viewStackQueue,
2929
ISequencer sequencer
3030
)
3131
{

Runtime/Ui/ViewStack/UiViewStack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class UiViewStack : IUiViewStack
1414
{
1515
private readonly IKeyValueRepository<Type, IViewStackEntry> entriesRepository = new SimpleKeyValueRepository<Type, IViewStackEntry>();
1616
private readonly ISingleRepository<IViewContext> currentContextRepository = new SimpleSingleRepository<IViewContext>();
17-
private readonly Queue<Type> viewStackQueue = new Queue<Type>();
17+
private readonly Stack<Type> viewStackQueue = new Stack<Type>();
1818
private readonly ISequencer sequencer = new Sequencer();
1919

2020
private readonly IUiFrame frame;

0 commit comments

Comments
 (0)