Commit graph

181 commits

Author SHA1 Message Date
tommyxchow
49b3385c12 Refactor & rename relevant channels to streams 2021-11-12 00:04:39 -05:00
tommyxchow
bbd810b0c5 Revise video/chat screen
- Added video overlay with controls for a cleaner look
- Added app bar when video is disabled
- Removed bottom back button in favor of a back button on the overlay
2021-11-11 23:00:32 -05:00
tommyxchow
e31c065864 Update search request 2021-11-11 22:53:03 -05:00
tommyxchow
b370683739 Add Channel object for search & API request 2021-11-11 22:51:31 -05:00
tommyxchow
3cf4961493 Rename Channel object to Stream
Channels represent any channel, offline or not. Streams represent live
channels, or streams, and is what is being requested for in the API.
2021-11-11 22:48:23 -05:00
tommyxchow
9499511c48 Add video store 2021-11-11 21:32:05 -05:00
tommyxchow
e3f774d8e5 Redesign & refactor home screen
- Removed hamburger/drawer menu
- Moved search to bottom navigation bar
- Moved settings and profile to app bar
- Moved channel list from screen to widget folder
- Created search screen for viewing results
- Switched from Cupertino to Material routes due to rebuild issues
2021-11-10 21:29:15 -05:00
tommyxchow
d0f17634ba Add new dependencies 2021-11-10 02:04:00 -05:00
Tommy Chow
4ed18c0666
Merge pull request #39 from tommyxchow/tommyxchow/issue6
Implement handling of IRC chat tags
2021-11-07 01:10:12 -04:00
tommyxchow
e3cefe741f Bump dependency versions 2021-11-06 01:33:56 -04:00
tommyxchow
2df2326f73 Revert 05df4e8, comment additions & fixes
The previously removed requests in 05df4e8 were actually required for
rendering emotes whenever the user themself sends a message.
2021-11-02 03:51:34 -04:00
tommyxchow
d4c3714561 Fix Unicode rendering in certain chat messages
On iOS, certain chat messages would have a trailing invalid/unknown
"emoji" (question mark inside a square).  This is caused by certain
Twitch IRC clients appending the INVALID Unicode character (U+E5000) to
circumvent restrictions on sending identical messages in quick
succession.

To resolve this, I added a check on the last word of the message. If
the character exists, the word will be remove. Since the word will only
contain a space and the character, it can be safely removed.

This commit also contains an additional "optimization" through
StringBuffers. By using the buffer there will be less TextSpan widgets
which theoretically should improve performance.
2021-11-02 03:44:05 -04:00
tommyxchow
5276f4bd76 Fix assetToUrl type in generateSpan 2021-10-26 01:58:47 -04:00
tommyxchow
05df4e8d2f Minor comment additions and fixes
Removed the redundant request for Twitch global and channel emotes in getAssets().

Since these emotes will be processed anyways when generating the span, there's no point in wasting bandwidth to fetch and store them.
2021-10-26 01:48:46 -04:00
tommyxchow
fc315ece27 Add documentation to chat store
Resolves #8, resolves #9, resolves #10, resolves #11, resolves #12, resolves #13.
2021-10-26 01:06:57 -04:00
tommyxchow
1afc979139 Add command enum, refactor chat store
- Added enum for IRC tag command for slightly better comparisons
- Moved span portion of renderMessage to its own function in irc_api.dart
- Moved message remove and end scroll to seperate function action
- Fixed emote tags applying to all users
2021-10-24 03:53:08 -04:00
tommyxchow
eb3f0bc082 Implement rendering of USERNOTICE messages 2021-10-23 02:28:20 -04:00
tommyxchow
4af72b8da0 Add settings and stats button to chat
- Added ability to toggle video directly in chat
- Added hint to text field when searching
- Tweaked chat text field padding
2021-10-23 00:31:27 -04:00
tommyxchow
012accd918 Add chat stats widget
This widget will be responsible for information relating to the current chat room, such as the room state and members.
2021-10-23 00:26:50 -04:00
tommyxchow
26e7a746db Fix handling of ROOMSTATE changes 2021-10-23 00:25:22 -04:00
tommyxchow
dc47812a6b Implement ROOMSTATE
- Added ROOMSTATE observable
- Fixed ROOMSTATE not registering in handleWebsocketData due to returnining in the for loop
2021-10-22 02:46:06 -04:00
tommyxchow
bb74b7bd6e Refactor IRC API
- Moved parse method to factory constructor in IRCMessage for better readability
- Renamed irc_message.dart to irc.dart to include other irc-related models
- Added ROOMSTATE model
- Moved addMessage functionality to chat store
2021-10-22 02:34:23 -04:00
tommyxchow
afbb8d7c09 Bump package versions to fix JSON warning 2021-10-22 02:27:03 -04:00
tommyxchow
58041d4126 Refactor IRC functions & tweak padding 2021-10-20 05:12:15 -04:00
tommyxchow
7a490f1ae7 Minor tweaks
- More token validation in auth store
- Made ban message bold
- Re-styled chat text field
- Settings screen is now a fullscreen dialog
2021-10-18 03:29:45 -04:00
tommyxchow
a897f1218e Add opacity to CLEARCHAT and CLEARMSG, fixes
- Increase chat message limit to 200
- Fix auto scroll post frame callback
2021-10-18 02:43:47 -04:00
tommyxchow
65611469f3 Add chat send message feature, refactoring
- Added userState and globalUserState fields to keep track of user data while chatting
- Adjusted CAP REQ commands to receive GLOBALUSERSTATE
- Adjusted return and break statements in switch and general cleanup
- Added sendMessage and dispose method
2021-10-17 17:56:16 -04:00
tommyxchow
5ff1744cb9 Move TextField to chat widget
- TextField will now only show up when the user is logged in
- Dispoe methods moved to a dedicated method in chat store for cleanliness
2021-10-17 17:51:10 -04:00
tommyxchow
639a06dbe0 Remove USERSTATEs from IRC API
The GLOBALUSERSTATE and USERSTATE are not related to any message list modifications. Instead, they can be handled with one line in the switch statement in chat store.

The USERSTATE method was renamed to addMessage for better readability.
2021-10-17 17:49:11 -04:00
tommyxchow
d632850b50 Fix computed headers not updating, improve logout 2021-10-17 16:26:02 -04:00
tommyxchow
7a0efa6658 Move scroll callback back to chat store
Also added the stream listener which I accidentally omitted in the last commit!
2021-10-17 02:25:40 -04:00
tommyxchow
fec255cceb Convert messages to observable, minor refactor 2021-10-17 02:15:51 -04:00
tommyxchow
9eca5189db Renames, implement CLEARCHAT and CLEARMSG 2021-10-17 02:14:15 -04:00
tommyxchow
f2e093a75b Replace StreamBuilder with Observer due to delay
The tiny delay betwen establishing the IRC connection and creating the StreamBuilder resulted in the initial IRC messages not being received (i.e., JOIN, USERSTATE, ROOMSTATE and more).
2021-10-17 02:10:49 -04:00
tommyxchow
9b92497a64 Escape newlines in channel card title 2021-10-16 23:07:05 -04:00
tommyxchow
9bcc9a0479 Refactor chat store
- Added user login to IRC NICK command
- Added first iteration of clearChat (#8)
- Moved parse method to irc_api.dart
- Fixed extra element when splitting snapshot data message
2021-10-16 19:11:35 -04:00
tommyxchow
7673a2c8a0 Add IRC API 2021-10-16 18:25:32 -04:00
tommyxchow
3d36e7f215 Tweak chat widget for more granular rebuilds 2021-10-16 04:05:30 -04:00
tommyxchow
63a63635c8 Remove unnecessary observables from auth store 2021-10-16 04:01:09 -04:00
tommyxchow
b97a8b8975 Add IRC message model 2021-10-16 04:00:03 -04:00
tommyxchow
6ba7aa4097 Upgrade packages 2021-10-16 03:57:56 -04:00
Tommy Chow
24b36ef570 Add profile card 2021-10-12 03:09:39 -04:00
Tommy Chow
eb3aac0231 Move home observers for more granular rebuilds 2021-10-12 02:34:30 -04:00
Tommy Chow
41af97341e Convert ChannelList to stateless widget 2021-10-12 02:31:32 -04:00
Tommy Chow
259a974cfc Update .gitignore 2021-10-12 00:08:00 -04:00
Tommy Chow
f72081b536 Replace observable with readonly in auth store 2021-10-11 23:01:40 -04:00
Tommy Chow
ae9437da9b Tweak Twitch api error handling 2021-10-10 21:48:31 -04:00
Tommy Chow
0305b12521 Add alert when searching for invalid channel 2021-10-10 01:43:24 -04:00
Tommy Chow
c8187fc719 Fix excessive rebuilds when tapping the same tab 2021-10-10 00:11:50 -04:00
Tommy Chow
6f3259ff45 Add ability to search a specific channel
Closes #28 and closes #29
2021-10-10 00:10:58 -04:00