Skip to content

Commit a77b0dc

Browse files
Fixed sorting
1 parent b515d91 commit a77b0dc

File tree

5 files changed

+34
-21
lines changed

5 files changed

+34
-21
lines changed

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dub-editor-sa-electron",
3-
"version": "2.3.0-beta",
3+
"version": "2.4.0-beta",
44
"description": "A dub editor for What the Dub and Rifftrax games by Wide Right Studios",
55
"license": "MIT",
66
"author": {

src/main/main.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@ const addToCollection = (
208208
}
209209
});
210210

211-
const collection = collections[game][collectionId];
212-
collection.sort();
213-
collections[game][collectionId] = collection;
214-
215211
const {collectionMeta} = getConfigDirectories();
216212

217213
log.info("WRITING TO " + collectionMeta);
@@ -237,10 +233,6 @@ const removeFromCollection = (game: string, collectionId: string, videoId: strin
237233
(element: string) => element !== videoId
238234
);
239235

240-
const collection = collections[game][collectionId];
241-
collection.sort();
242-
collections[game][collectionId] = collection;
243-
244236
const {collectionMeta} = getConfigDirectories();
245237

246238
// Store updated file
@@ -1030,10 +1022,6 @@ ipcMain.handle('addToCollection', (event, { collectionId, videoId, game }) => {
10301022
collections[game][collectionId].push(videoId);
10311023
}
10321024

1033-
const collection = collections[game][collectionId];
1034-
collection.sort();
1035-
collections[game][collectionId] = collection;
1036-
10371025
const {collectionMeta} = getConfigDirectories();
10381026

10391027
// Store updated file
@@ -1059,10 +1047,6 @@ ipcMain.handle(
10591047
(element: string) => element !== videoId
10601048
);
10611049

1062-
const collection = collections[game][collectionId];
1063-
collection.sort();
1064-
collections[game][collectionId] = collection;
1065-
10661050
const {collectionMeta} = getConfigDirectories();
10671051

10681052
// Store updated file

src/renderer/components/ClipTable.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export default ({
9494
});
9595
}
9696

97+
videos.sort((a, b) => a.name.localeCompare(b.name));
98+
9799
return (
98100
<div>
99101
<div

src/renderer/components/TimeLine.jsx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,38 @@ export default ({
7676

7777
return (
7878
<div className="timeline">
79-
<div style={{ textAlign: 'left' }}>
80-
<span>
79+
<div
80+
style={{
81+
display: 'flex',
82+
flexDirection: 'row',
83+
justifyContent: 'space-between',
84+
}}
85+
>
86+
<div>
8187
{convertMillisecondsToTimestamp(currentSliderPosition)}
82-
</span>
88+
</div>
89+
<div>
90+
{!isPlaying && currentPosition < videoLength ? (
91+
<button
92+
onClick={() => {
93+
if (currentSliderPosition < videoLengthMs) {
94+
onStateChange(true);
95+
}
96+
}}
97+
>
98+
Play
99+
</button>
100+
) : (
101+
<button
102+
onClick={() => {
103+
onStateChange(false);
104+
}}
105+
>
106+
Pause
107+
</button>
108+
)}
109+
</div>
110+
<div></div>
83111
</div>
84112
<input
85113
type="range"

src/renderer/routes/editor/AdvancedEditor.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ let AdvancedEditor = () => {
547547
currentSliderPosition <=
548548
batchClip.clip.endTime))
549549
}
550-
controls={true}
551550
videoPosition={currentPosition}
552551
subs={subs}
553552
offset={offset}

0 commit comments

Comments
 (0)