diff --git a/CHANGELOG.md b/CHANGELOG.md index 7150a2b..f56b861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.16.2 +* Fixed broken auto-ads + ## 1.16.1 * Fixed ad fields becoming uneditable after an ad is removed * Fixed ads attempting to send after leaving a channel diff --git a/README.md b/README.md index 671c218..f509eff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Download -[Windows](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.1/F-Chat-Rising-1.16.1-win.exe) (75 MB) -| [MacOS](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.1/F-Chat-Rising-1.16.1-macos.dmg) (76 MB) -| [Linux](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.1/F-Chat-Rising-1.16.1-linux.AppImage) (76 MB) +[Windows](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.2/F-Chat-Rising-1.16.2-win.exe) (75 MB) +| [MacOS](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.2/F-Chat-Rising-1.16.2-macos.dmg) (76 MB) +| [Linux](https://github.com/mrstallion/fchat-rising/releases/download/v1.16.2/F-Chat-Rising-1.16.2-linux.AppImage) (76 MB) # F-Chat Rising diff --git a/chat/conversations.ts b/chat/conversations.ts index ee7f83a..d6a192c 100644 --- a/chat/conversations.ts +++ b/chat/conversations.ts @@ -641,14 +641,6 @@ export default function(this: any): Interfaces.State { queuedJoin(state.pinned.channels.slice()); }); core.channels.onEvent(async(type, channel, member) => { - if (type === 'leave') { - const conv = state.channelMap[channel.id]; - - if (conv) { - conv.adManager.stop(); - } - } - if(type === 'join') if(member === undefined) { const conv = new ChannelConversation(channel); diff --git a/docs/_config.yml b/docs/_config.yml index 3c8dc9d..a8f283f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -50,7 +50,7 @@ theme: jekyll-theme-slate changelog: https://github.com/mrstallion/fchat-rising/blob/master/CHANGELOG.md download: - version: 1.16.1 + version: 1.16.2 url: https://github.com/mrstallion/fchat-rising/releases/download/v%VERSION%/F-Chat-Rising-%VERSION%-%PLATFORM_TAIL% diff --git a/electron/package.json b/electron/package.json index 88dfcd7..0b9106a 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "fchat", - "version": "1.16.1", + "version": "1.16.2", "author": "The F-List Team and Mister Stallion (Esq.)", "description": "F-List.net Chat Client", "main": "main.js", diff --git a/fchat/channels.ts b/fchat/channels.ts index 62eeb8a..6bfbdb2 100644 --- a/fchat/channels.ts +++ b/fchat/channels.ts @@ -1,5 +1,6 @@ import {decodeHTML} from './common'; import {Channel as Interfaces, Character, Connection} from './interfaces'; +import core from '../chat/core'; interface SortableMember extends Interfaces.Member { rank: Interfaces.Rank, @@ -202,6 +203,12 @@ export default function(this: void, connection: Connection, characters: Characte if(channel === undefined) return; const item = state.getChannelItem(data.channel); if(data.character === connection.character) { + const conv = core.conversations.channelConversations.find((c) => c.channel.id === channel.id); + + if (conv) { + conv.adManager.stop(); + } + state.joinedChannels.splice(state.joinedChannels.indexOf(channel), 1); delete state.joinedMap[channel.id]; for(const handler of state.handlers) await handler('leave', channel); @@ -275,4 +282,4 @@ export default function(this: void, connection: Connection, characters: Characte } }); return state; -} \ No newline at end of file +} diff --git a/package.json b/package.json index 99b8409..9e399b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "f-list-rising", - "version": "1.16.1", + "version": "1.16.2", "author": "The F-List Team and and Mister Stallion (Esq.)", "description": "A heavily modded F-Chat 3.0 client for F-List", "license": "MIT",