Skip to content

Commit

Permalink
fix: use ioc import instead of container mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
PandaGuerrier committed Jun 25, 2023
1 parent f4018c6 commit 749a35f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import 'package:mineral/core/api.dart';
import 'package:mineral/core/builders.dart';
import 'package:mineral/framework.dart';
import 'package:mineral/src/api/emoji.dart';
import 'package:mineral/src/internal/mixins/container.dart';
import 'package:mineral/src/internal/services/event_service.dart';
import 'package:mineral/src/internal/websockets/websocket_packet.dart';
import 'package:mineral/src/internal/websockets/websocket_response.dart';
import 'package:mineral_ioc/ioc.dart';

import '../../../../core/events.dart';

class MessageReactionAddPacket with Container implements WebsocketPacket {
class MessageReactionAddPacket implements WebsocketPacket {
@override
Future<void> handle (WebsocketResponse websocketResponse) async {
EventService eventService = container.use<EventService>();
MineralClient client = container.use<MineralClient>();
EventService eventService = ioc.use<EventService>();
MineralClient client = ioc.use<MineralClient>();

dynamic payload = websocketResponse.payload;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import 'package:mineral/core/builders.dart';
import 'package:mineral/core/events.dart';
import 'package:mineral/framework.dart';
import 'package:mineral/src/api/emoji.dart';
import 'package:mineral/src/internal/mixins/container.dart';
import 'package:mineral/src/internal/services/event_service.dart';
import 'package:mineral/src/internal/websockets/websocket_packet.dart';
import 'package:mineral/src/internal/websockets/websocket_response.dart';
import 'package:mineral_ioc/ioc.dart';

class MessageReactionRemovePacket with Container implements WebsocketPacket {
class MessageReactionRemovePacket implements WebsocketPacket {
@override
Future<void> handle (WebsocketResponse websocketResponse) async {
EventService eventService = container.use<EventService>();
MineralClient client = container.use<MineralClient>();
EventService eventService = ioc.use<EventService>();
MineralClient client = ioc.use<MineralClient>();

dynamic payload = websocketResponse.payload;

Expand Down

0 comments on commit 749a35f

Please sign in to comment.