Use flag for isvideo

pull/37/head
Varun Patil 2022-09-11 20:52:07 -07:00
parent fa65f1866f
commit 4ca6e3977c
4 changed files with 13 additions and 8 deletions

View File

@ -25,7 +25,7 @@ trait TimelineQueryDay {
} }
if ($row["category"] === ITags::TAG_FAVORITE) { if ($row["category"] === ITags::TAG_FAVORITE) {
$row["favorite"] = 1; $row["isfavorite"] = 1;
} }
unset($row["category"]); unset($row["category"]);
} }

View File

@ -13,7 +13,7 @@
v-if="!(data.flag & c.FLAG_PLACEHOLDER)" v-if="!(data.flag & c.FLAG_PLACEHOLDER)"
@click="toggleSelect"></div> @click="toggleSelect"></div>
<div v-if="data.isvideo" class="icon-video-white"></div> <div v-if="data.flag & c.FLAG_IS_VIDEO" class="icon-video-white"></div>
<div v-if="data.flag & c.FLAG_IS_FAVORITE" class="icon-starred"></div> <div v-if="data.flag & c.FLAG_IS_FAVORITE" class="icon-starred"></div>
<div class="img-outer" :style="{ <div class="img-outer" :style="{

View File

@ -615,7 +615,11 @@ export default {
} }
// Flag conversion // Flag conversion
if (photo.favorite) { if (photo.isvideo) {
photo.flag |= constants.FLAG_IS_VIDEO;
delete photo.isvideo;
}
if (photo.isfavorite) {
photo.flag |= constants.FLAG_IS_FAVORITE; photo.flag |= constants.FLAG_IS_FAVORITE;
delete photo.favorite; delete photo.favorite;
} }

View File

@ -2,9 +2,10 @@ export default {
FLAG_PLACEHOLDER: 1 << 0, FLAG_PLACEHOLDER: 1 << 0,
FLAG_LOADED: 1 << 1, FLAG_LOADED: 1 << 1,
FLAG_LOAD_FAIL: 1 << 2, FLAG_LOAD_FAIL: 1 << 2,
FLAG_SELECTED: 1 << 3, FLAG_IS_VIDEO: 1 << 3,
FLAG_LEAVING: 1 << 4, FLAG_IS_FAVORITE: 1 << 4,
FLAG_EXIT_LEFT: 1 << 5, FLAG_SELECTED: 1 << 5,
FLAG_ENTER_RIGHT: 1 << 6, FLAG_LEAVING: 1 << 6,
FLAG_IS_FAVORITE: 1 << 7, FLAG_EXIT_LEFT: 1 << 7,
FLAG_ENTER_RIGHT: 1 << 8,
}; };