mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-01 03:47:36 -05:00
build: upgrade provider
This commit is contained in:
@@ -41,7 +41,7 @@ class _GhEmojiActionState extends State<GhEmojiAction> {
|
||||
var operation = isRemove ? 'remove' : 'add';
|
||||
|
||||
try {
|
||||
await Provider.of<AuthModel>(context).query('''
|
||||
await context.read<AuthModel>().query('''
|
||||
mutation {
|
||||
${operation}Reaction(input: {subjectId: "$id", content: $emojiKey}) {
|
||||
clientMutationId
|
||||
@@ -53,8 +53,7 @@ mutation {
|
||||
payload[emojiKey]['viewerHasReacted'] = !isRemove;
|
||||
});
|
||||
} catch (e) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
theme.showWarning(context, e);
|
||||
context.read<ThemeModel>().showWarning(context, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user