Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 0a14bd2

Browse files
authored
Merge pull request #3868 from withspectrum/2.4.32
2.4.32
2 parents 7f322fe + dfd9d50 commit 0a14bd2

File tree

18 files changed

+283
-233
lines changed

18 files changed

+283
-233
lines changed

api/models/threadReaction.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import type { DBThreadReaction } from 'shared/types';
88
import { events } from 'shared/analytics';
99
import { trackQueue } from 'shared/bull/queues';
10+
import { getThreadById } from './thread';
1011

1112
type ThreadReactionType = 'like';
1213

@@ -34,6 +35,7 @@ export const addThreadReaction = (input: ThreadReactionInput, userId: string): P
3435
.filter({ userId })
3536
.run()
3637
.then(async results => {
38+
const thread = await getThreadById(input.threadId)
3739
// if the reaction already exists in the db, it was previously deleted
3840
// just remove the deletedAt field
3941
if (results && results.length > 0) {
@@ -47,13 +49,15 @@ export const addThreadReaction = (input: ThreadReactionInput, userId: string): P
4749
},
4850
});
4951

50-
sendThreadReactionNotificationQueue.add({ threadReaction: thisReaction, userId });
52+
if (thread && (thread.creatorId !== userId)) {
53+
sendThreadReactionNotificationQueue.add({ threadReaction: thisReaction, userId });
5154

52-
processReputationEventQueue.add({
53-
userId,
54-
type: 'thread reaction created',
55-
entityId: thisReaction.threadId,
56-
});
55+
processReputationEventQueue.add({
56+
userId,
57+
type: 'thread reaction created',
58+
entityId: thisReaction.threadId,
59+
});
60+
}
5761

5862
return db
5963
.table('threadReactions')
@@ -84,13 +88,15 @@ export const addThreadReaction = (input: ThreadReactionInput, userId: string): P
8488
context: { threadReactionId: threadReaction.id },
8589
});
8690

87-
sendThreadReactionNotificationQueue.add({ threadReaction, userId });
88-
89-
processReputationEventQueue.add({
90-
userId,
91-
type: 'thread reaction created',
92-
entityId: threadReaction.threadId,
93-
});
91+
if (thread && (thread.creatorId !== userId)) {
92+
sendThreadReactionNotificationQueue.add({ threadReaction: threadReaction, userId });
93+
94+
processReputationEventQueue.add({
95+
userId,
96+
type: 'thread reaction created',
97+
entityId: threadReaction.threadId,
98+
});
99+
}
94100

95101
return threadReaction;
96102
});

desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"electron": "^1.8.4",
2222
"electron-builder": "^20.8.1",
23-
"nodemon": "^1.18.3",
23+
"nodemon": "^1.18.4",
2424
"rimraf": "^2.6.2"
2525
},
2626
"scripts": {

desktop/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,9 +1768,9 @@ node-pre-gyp@^0.10.0:
17681768
semver "^5.3.0"
17691769
tar "^4"
17701770

1771-
nodemon@^1.18.3:
1772-
version "1.18.3"
1773-
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.3.tgz#46e681ee0dd1b590562e03019b4c5df234f906f9"
1771+
nodemon@^1.18.4:
1772+
version "1.18.4"
1773+
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.4.tgz#873f65fdb53220eb166180cf106b1354ac5d714d"
17741774
dependencies:
17751775
chokidar "^2.0.2"
17761776
debug "^3.1.0"

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "Spectrum",
3-
"version": "2.4.31",
4-
"version": "2.4.29",
3+
"version": "2.4.32",
54
"license": "BSD-3-Clause",
65
"devDependencies": {
76
"babel-cli": "^6.24.1",

shared/graphql/queries/community/getCommunities.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ export const getCommunitiesBySlugsQuery = gql`
4242
query getCommunitiesBySlugs($slugs: [LowercaseString]) {
4343
communities(slugs: $slugs) {
4444
...communityInfo
45-
...communityMetaData
4645
}
4746
}
4847
${communityInfoFragment}
49-
${communityMetaDataFragment}
5048
`;
5149

5250
const getCommunitiesBySlugOptions = {
@@ -67,11 +65,9 @@ const getCommunitiesByCuratedContentTypeQuery = gql`
6765
query getCommunitiesCollection($curatedContentType: String) {
6866
communities(curatedContentType: $curatedContentType) {
6967
...communityInfo
70-
...communityMetaData
7168
}
7269
}
7370
${communityInfoFragment}
74-
${communityMetaDataFragment}
7571
`;
7672

7773
const getCommunitiesByCuratedContentTypeOptions = {

src/components/granularUserProfile/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const Name = styled.span`
5858
line-height: 1.2;
5959
vertical-align: middle;
6060
display: flex;
61-
align-items: flex-end;
61+
align-items: center;
6262
6363
&:hover {
6464
color: ${theme.brand.alt};

src/components/loading/index.js

Lines changed: 66 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
ShimmerLine,
2929
ShimmerSelect,
3030
Cover,
31+
CircularCover,
3132
LoadingOverlay,
3233
LoadingNavbarContainer,
3334
LogoLink,
@@ -204,82 +205,68 @@ export const LoadingInboxThread = () => (
204205
<ShimmerInboxThread>
205206
<ShimmerBase>
206207
<ShimmerLine />
207-
<Cover
208+
<CircularCover
208209
style={{
209-
top: '0',
210-
left: '0',
211-
height: '4px',
212-
width: '100%',
210+
top: 0,
211+
left: 0,
212+
height: '40px',
213+
width: '40px',
213214
}}
214215
/>
215216
<Cover
216217
style={{
217-
top: '16px',
218-
left: '0',
219-
height: '16px',
220-
width: '100%',
218+
top: '0',
219+
left: '40px',
220+
height: '40px',
221+
width: '8px',
221222
}}
222223
/>
223224
<Cover
224225
style={{
225-
top: '4px',
226-
left: '120px',
227-
height: '12px',
228-
width: '100%',
226+
top: '0',
227+
left: '50%',
228+
height: '40px',
229+
width: '50%',
229230
}}
230231
/>
232+
231233
<Cover
232234
style={{
233-
top: '24px',
234-
left: '0',
235+
top: '20px',
236+
left: '40px',
235237
height: '8px',
236-
width: '100%',
238+
width: '50%',
237239
}}
238240
/>
241+
239242
<Cover
240243
style={{
241-
top: '60px',
244+
top: '40px',
242245
left: '0',
243-
height: '12px',
246+
height: '16px',
244247
width: '100%',
245248
}}
246249
/>
247250
<Cover
248251
style={{
249-
top: '72px',
250-
left: '24px',
251-
height: '24px',
252-
width: '4px',
253-
}}
254-
/>
255-
<Cover
256-
style={{
257-
top: '72px',
258-
left: '52px',
259-
height: '24px',
260-
width: '4px',
261-
}}
262-
/>
263-
<Cover
264-
style={{
265-
top: '72px',
266-
left: '80px',
267-
height: '24px',
268-
width: '4px',
252+
top: '40px',
253+
left: '0',
254+
height: '100%',
255+
width: '48px',
269256
}}
270257
/>
271258
<Cover
272259
style={{
273260
top: '72px',
274-
left: '108px',
275-
height: '24px',
276-
width: '4px',
261+
left: '48px',
262+
height: '8px',
263+
width: '100%',
277264
}}
278265
/>
279266
<Cover
280267
style={{
281268
top: '72px',
282-
left: '136px',
269+
left: '35%',
283270
height: '24px',
284271
width: '100%',
285272
}}
@@ -307,6 +294,14 @@ export const LoadingThreadDetail = () => (
307294
<ShimmerThreadDetail>
308295
<ShimmerBase>
309296
<ShimmerLine />
297+
<CircularCover
298+
style={{
299+
top: 0,
300+
left: 0,
301+
height: '41px',
302+
width: '41px',
303+
}}
304+
/>
310305
<Cover
311306
style={{
312307
top: '0',
@@ -948,74 +943,74 @@ export const LoadingProfileThreadDetail = () => (
948943
<ShimmerLine />
949944
<Cover
950945
style={{
951-
top: '0',
946+
top: '70px',
952947
left: '0',
953-
height: '48px',
954-
width: 'calc(50% - 20px)',
948+
height: '24px',
949+
width: 'calc(50% - 24px)',
955950
}}
956951
/>
957952
<Cover
958953
style={{
959-
top: '0',
954+
top: '70px',
960955
right: '0',
961-
height: '48px',
962-
width: 'calc(50% - 20px)',
956+
height: '24px',
957+
width: 'calc(50% - 24px)',
963958
}}
964959
/>
965960
<Cover
966961
style={{
967-
top: '40px',
968-
left: '0',
962+
top: '94px',
963+
left: 0,
969964
height: '16px',
970965
width: '100%',
971966
}}
972967
/>
973968
<Cover
974969
style={{
975-
top: '64px',
976-
left: '0',
977-
height: '16px',
978-
width: '100%',
970+
top: '110px',
971+
left: 0,
972+
height: '20px',
973+
width: '25%',
979974
}}
980975
/>
981976
<Cover
982977
style={{
983-
top: '88px',
984-
left: '0',
985-
height: '16px',
986-
width: '100%',
978+
top: '110px',
979+
right: 0,
980+
height: '20px',
981+
width: '25%',
987982
}}
988983
/>
989984
<Cover
990985
style={{
991-
top: '48px',
992-
right: '0',
986+
top: '130px',
987+
left: 0,
993988
height: '16px',
994-
width: '32px',
989+
width: '100%',
995990
}}
996991
/>
997992
<Cover
998993
style={{
999-
top: '48px',
1000-
left: '0',
994+
top: '146px',
995+
left: 0,
1001996
height: '16px',
1002-
width: '32px',
997+
width: '35%',
1003998
}}
1004999
/>
10051000
<Cover
10061001
style={{
1007-
top: '72px',
1008-
right: '0',
1002+
top: '146px',
1003+
right: 0,
10091004
height: '16px',
1010-
width: '64px',
1005+
width: '35%',
10111006
}}
10121007
/>
10131008
<Cover
10141009
style={{
1015-
top: '72px',
1016-
left: '0',
1017-
height: '16px',
1018-
width: '64px',
1010+
top: '162px',
1011+
left: 0,
1012+
height: '100%',
1013+
width: '100%',
10191014
}}
10201015
/>
10211016
</ShimmerBase>

0 commit comments

Comments
 (0)