Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix: repair CI failures and remove slowmode reset (#1588)

Hampusd56c1e5674cf
diff --git a/fluxer_app/src/features/channel/components/modals/channel_tabs/channel_overview_tab/SlowmodeControl.tsx b/fluxer_app/src/features/channel/components/modals/channel_tabs/channel_overview_tab/SlowmodeControl.tsx
index 71a36ab13..14622a116 100644
--- a/fluxer_app/src/features/channel/components/modals/channel_tabs/channel_overview_tab/SlowmodeControl.tsx
+++ b/fluxer_app/src/features/channel/components/modals/channel_tabs/channel_overview_tab/SlowmodeControl.tsx
@@ -5,7 +5,7 @@ import {SettingsControlRow} from '@app/features/channel/components/modals/channe
import type {FormInputs} from '@app/features/channel/components/modals/channel_tabs/channel_overview_tab/shared';
import {getCachedNumberFormat} from '@app/features/i18n/utils/IntlCache';
import {formatPermissionLabel} from '@app/features/permissions/utils/PermissionUtils';
-import {RESET_SLIDER_TO_DEFAULT_VALUE_DESCRIPTOR, Slider} from '@app/features/ui/components/Slider';
+import {Slider} from '@app/features/ui/components/Slider';
import {Permissions} from '@fluxer/constants/src/ChannelConstants';
import {CHANNEL_RATE_LIMIT_PER_USER_MAX, CHANNEL_RATE_LIMIT_PER_USER_MIN} from '@fluxer/constants/src/LimitConstants';
import {SECONDS_PER_HOUR, SECONDS_PER_MINUTE} from '@fluxer/date_utils/src/DateConstants';
@@ -71,7 +71,6 @@ export const SlowmodeControl: React.FC<SlowmodeControlProps> = ({form}) => {
const {i18n} = useLingui();
const slowmodeLabel = i18n._(SLOWMODE_DESCRIPTOR);
const bypassSlowmodePermissionLabel = formatPermissionLabel(i18n, Permissions.BYPASS_SLOWMODE);
- const resetSliderLabel = i18n._(RESET_SLIDER_TO_DEFAULT_VALUE_DESCRIPTOR);
return (
<Controller
name="slowmode"
@@ -110,9 +109,6 @@ export const SlowmodeControl: React.FC<SlowmodeControlProps> = ({form}) => {
}}
onValueRender={(seconds) => formatSlowmodeDuration(i18n, Math.round(seconds))}
onValueChange={(seconds) => field.onChange(Math.round(seconds))}
- showResetButton={true}
- onReset={() => field.onChange(0)}
- resetTooltip={resetSliderLabel}
/>
</div>
</SettingsControlRow>
diff --git a/fluxer_app/src/features/typing/state/LocalTypingStateMachine.ts b/fluxer_app/src/features/typing/state/LocalTypingStateMachine.ts
index 1061cf062..b839c242a 100644
--- a/fluxer_app/src/features/typing/state/LocalTypingStateMachine.ts
+++ b/fluxer_app/src/features/typing/state/LocalTypingStateMachine.ts
@@ -122,6 +122,13 @@ export const localTypingStateMachine = setup({
};
}
if (context.remoteSendAt != null) {
+ if (context.lastRemoteSentAt == null) {
+ return {
+ lastChangeAt: event.now,
+ remoteSendAt: event.now + LOCAL_TYPING_REMOTE_SEND_DELAY_MS,
+ remotePendingVersion: context.remotePendingVersion + 1,
+ };
+ }
return {
lastChangeAt: event.now,
};
diff --git a/fluxer_media_proxy/src/disposition.rs b/fluxer_media_proxy/src/disposition.rs
index 56697b88c..308f72faf 100644
--- a/fluxer_media_proxy/src/disposition.rs
+++ b/fluxer_media_proxy/src/disposition.rs
@@ -42,8 +42,7 @@ pub fn is_inline_viewable(content_type: &str) -> bool {
}
fn is_scriptable_document(mime: &str) -> bool {
- mime.eq_ignore_ascii_case("image/svg+xml")
- || mime.eq_ignore_ascii_case("application/pdf")
+ mime.eq_ignore_ascii_case("image/svg+xml") || mime.eq_ignore_ascii_case("application/pdf")
}
fn is_safe_quoted_filename(s: &str) -> bool {