increase default history title length
This commit is contained in:
parent
0165edb10e
commit
a3f1a2b036
1 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ import { RootState } from "../redux/store";
|
|||
import { getLocalStorage, setLocalStorage } from "../util/localStorage";
|
||||
import { useLastSessionContext } from "../context/LastSessionContext";
|
||||
|
||||
const MAX_TITLE_LENGTH = 100;
|
||||
|
||||
function truncateText(text: string, maxLength: number) {
|
||||
if (text.length > maxLength) {
|
||||
return text.slice(0, maxLength - 3) + "...";
|
||||
|
|
@ -84,7 +86,7 @@ function useHistory(dispatch: Dispatch) {
|
|||
.split("\n")
|
||||
.filter((l) => l.trim() !== "")
|
||||
.slice(-1)[0] || "",
|
||||
50,
|
||||
MAX_TITLE_LENGTH,
|
||||
)
|
||||
: stateCopy.title?.length > 0
|
||||
? stateCopy.title
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue