diff options
Diffstat (limited to 'src/view/com/util')
-rw-r--r-- | src/view/com/util/Toast.web.tsx | 5 | ||||
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 9 | ||||
-rw-r--r-- | src/view/com/util/post-ctrls/PostCtrls.tsx | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/view/com/util/Toast.web.tsx b/src/view/com/util/Toast.web.tsx index d5a843541..1f9eb479b 100644 --- a/src/view/com/util/Toast.web.tsx +++ b/src/view/com/util/Toast.web.tsx @@ -2,7 +2,7 @@ * Note: the dataSet properties are used to leverage custom CSS in public/index.html */ -import React, {useState, useEffect} from 'react' +import React, {useEffect, useState} from 'react' import {StyleSheet, Text, View} from 'react-native' import { FontAwesomeIcon, @@ -39,7 +39,7 @@ export const ToastContainer: React.FC<ToastContainerProps> = ({}) => { <View style={styles.container}> <FontAwesomeIcon icon={activeToast.icon} - size={24} + size={20} style={styles.icon as FontAwesomeIconStyle} /> <Text style={styles.text}>{activeToast.text}</Text> @@ -79,6 +79,7 @@ const styles = StyleSheet.create({ }, icon: { color: '#fff', + flexShrink: 0, }, text: { color: '#fff', diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 45e00e58c..6c82ec8cc 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -149,7 +149,7 @@ let PostDropdownBtn = ({ }, e => { logger.error('Failed to delete post', {message: e}) - Toast.show(_(msg`Failed to delete post, please try again`)) + Toast.show(_(msg`Failed to delete post, please try again`), 'xmark') }, ) }, [ @@ -177,7 +177,10 @@ let PostDropdownBtn = ({ } catch (e: any) { if (e?.name !== 'AbortError') { logger.error('Failed to toggle thread mute', {message: e}) - Toast.show(_(msg`Failed to toggle thread mute, please try again`)) + Toast.show( + _(msg`Failed to toggle thread mute, please try again`), + 'xmark', + ) } } }, [isThreadMuted, unmuteThread, _, muteThread]) @@ -186,7 +189,7 @@ let PostDropdownBtn = ({ const str = richTextToString(richText, true) Clipboard.setStringAsync(str) - Toast.show(_(msg`Copied to clipboard`)) + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') }, [_, richText]) const onPressTranslate = React.useCallback(() => { diff --git a/src/view/com/util/post-ctrls/PostCtrls.tsx b/src/view/com/util/post-ctrls/PostCtrls.tsx index c3af3a61e..478b8f0f8 100644 --- a/src/view/com/util/post-ctrls/PostCtrls.tsx +++ b/src/view/com/util/post-ctrls/PostCtrls.tsx @@ -354,7 +354,7 @@ let PostCtrls = ({ onPress={e => { e.stopPropagation() Clipboard.setStringAsync(feedContext) - Toast.show(_(msg`Copied to clipboard`)) + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') }}> <Text style={{ |