| ... | @@ -159,7 +159,6 @@ import { | ... | @@ -159,7 +159,6 @@ import { |
| 159 | copyComposerDraftContentIfEmpty, | 159 | copyComposerDraftContentIfEmpty, |
| 160 | copyComposerDraftContentState, | 160 | copyComposerDraftContentState, |
| 161 | decodePersistedComposerState, | 161 | decodePersistedComposerState, |
| 162 | decodePersistedComposerDrafts, | | |
| 163 | ensureComposerDraftsLoaded, | 162 | ensureComposerDraftsLoaded, |
| 164 | type ComposerDraft, | 163 | type ComposerDraft, |
| 165 | flushComposerDrafts, | 164 | flushComposerDrafts, |
| ... | @@ -252,12 +251,12 @@ describe("mobile composer drafts", () => { | ... | @@ -252,12 +251,12 @@ describe("mobile composer drafts", () => { |
| 252 | }; | 251 | }; |
| 253 | | 252 | |
| 254 | expect( | 253 | expect( |
| 255 | decodePersistedComposerDrafts({ | 254 | decodePersistedComposerState({ |
| 256 | schemaVersion: 1, | 255 | schemaVersion: 1, |
| 257 | drafts: { | 256 | drafts: { |
| 258 | "environment-1:thread-1": { text: "Review this file", attachments: [file] }, | 257 | "environment-1:thread-1": { text: "Review this file", attachments: [file] }, |
| 259 | }, | 258 | }, |
| 260 | }), | 259 | }).drafts, |
| 261 | ).toEqual({ | 260 | ).toEqual({ |
| 262 | "environment-1:thread-1": { text: "Review this file", attachments: [file] }, | 261 | "environment-1:thread-1": { text: "Review this file", attachments: [file] }, |
| 263 | }); | 262 | }); |
| ... | @@ -987,7 +986,7 @@ describe("mobile composer drafts", () => { | ... | @@ -987,7 +986,7 @@ describe("mobile composer drafts", () => { |
| 987 | | 986 | |
| 988 | it("rejects persisted images without image bytes or a file URI", () => { | 987 | it("rejects persisted images without image bytes or a file URI", () => { |
| 989 | expect(() => | 988 | expect(() => |
| 990 | decodePersistedComposerDrafts({ | 989 | decodePersistedComposerState({ |
| 991 | schemaVersion: 1, | 990 | schemaVersion: 1, |
| 992 | drafts: { | 991 | drafts: { |
| 993 | "environment-1:thread-1": { | 992 | "environment-1:thread-1": { |
| ... | @@ -1010,7 +1009,7 @@ describe("mobile composer drafts", () => { | ... | @@ -1010,7 +1009,7 @@ describe("mobile composer drafts", () => { |
| 1010 | | 1009 | |
| 1011 | it("hydrates selector state even when the message content is empty", () => { | 1010 | it("hydrates selector state even when the message content is empty", () => { |
| 1012 | expect( | 1011 | expect( |
| 1013 | decodePersistedComposerDrafts({ | 1012 | decodePersistedComposerState({ |
| 1014 | schemaVersion: 1, | 1013 | schemaVersion: 1, |
| 1015 | drafts: { | 1014 | drafts: { |
| 1016 | "new-task:environment-1:project-1": { | 1015 | "new-task:environment-1:project-1": { |
| ... | @@ -1030,7 +1029,7 @@ describe("mobile composer drafts", () => { | ... | @@ -1030,7 +1029,7 @@ describe("mobile composer drafts", () => { |
| 1030 | }, | 1029 | }, |
| 1031 | }, | 1030 | }, |
| 1032 | }, | 1031 | }, |
| 1033 | }), | 1032 | }).drafts, |
| 1034 | ).toEqual({ | 1033 | ).toEqual({ |
| 1035 | "new-task:environment-1:project-1": { | 1034 | "new-task:environment-1:project-1": { |
| 1036 | text: "", | 1035 | text: "", |
| ... | @@ -1053,18 +1052,18 @@ describe("mobile composer drafts", () => { | ... | @@ -1053,18 +1052,18 @@ describe("mobile composer drafts", () => { |
| 1053 | | 1052 | |
| 1054 | it("keeps legacy content-only drafts and rejects invalid selector state", () => { | 1053 | it("keeps legacy content-only drafts and rejects invalid selector state", () => { |
| 1055 | expect( | 1054 | expect( |
| 1056 | decodePersistedComposerDrafts({ | 1055 | decodePersistedComposerState({ |
| 1057 | schemaVersion: 1, | 1056 | schemaVersion: 1, |
| 1058 | drafts: { | 1057 | drafts: { |
| 1059 | "environment-1:thread-1": DRAFT, | 1058 | "environment-1:thread-1": DRAFT, |
| 1060 | }, | 1059 | }, |
| 1061 | }), | 1060 | }).drafts, |
| 1062 | ).toEqual({ | 1061 | ).toEqual({ |
| 1063 | "environment-1:thread-1": DRAFT, | 1062 | "environment-1:thread-1": DRAFT, |
| 1064 | }); | 1063 | }); |
| 1065 | | 1064 | |
| 1066 | expect(() => | 1065 | expect(() => |
| 1067 | decodePersistedComposerDrafts({ | 1066 | decodePersistedComposerState({ |
| 1068 | schemaVersion: 1, | 1067 | schemaVersion: 1, |
| 1069 | drafts: { | 1068 | drafts: { |
| 1070 | "environment-1:thread-1": { | 1069 | "environment-1:thread-1": { |