Fix more import/export tests for backups
This commit is contained in:
parent
8dabe4fbe4
commit
84c562d0b2
13 changed files with 225 additions and 60 deletions
|
@ -196,14 +196,22 @@ export enum GiftBadgeStates {
|
|||
Unopened = 'Unopened',
|
||||
Opened = 'Opened',
|
||||
Redeemed = 'Redeemed',
|
||||
Failed = 'Failed',
|
||||
}
|
||||
|
||||
export type GiftBadgeType = {
|
||||
expiration: number;
|
||||
id: string | undefined;
|
||||
level: number;
|
||||
state: GiftBadgeStates;
|
||||
};
|
||||
export type GiftBadgeType =
|
||||
| {
|
||||
state:
|
||||
| GiftBadgeStates.Unopened
|
||||
| GiftBadgeStates.Opened
|
||||
| GiftBadgeStates.Redeemed;
|
||||
expiration: number;
|
||||
id: string | undefined;
|
||||
level: number;
|
||||
}
|
||||
| {
|
||||
state: GiftBadgeStates.Failed;
|
||||
};
|
||||
|
||||
export type PropsData = {
|
||||
id: string;
|
||||
|
@ -1385,7 +1393,10 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (giftBadge.state === GiftBadgeStates.Unopened) {
|
||||
if (
|
||||
giftBadge.state === GiftBadgeStates.Unopened ||
|
||||
giftBadge.state === GiftBadgeStates.Failed
|
||||
) {
|
||||
const description =
|
||||
direction === 'incoming'
|
||||
? i18n('icu:message--donation--unopened--incoming')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue