Remove this. everywhere, add small note to override style

This commit is contained in:
Infi
2024-04-10 17:45:25 +02:00
parent 2dfd11f018
commit 948383b0c5
28 changed files with 316 additions and 304 deletions
+11 -11
View File
@@ -12,14 +12,14 @@ internal abstract class Chunk {
internal Payload? Link { get; set; }
protected Chunk(ChunkSource source, Payload? link) {
this.Source = source;
this.Link = link;
Source = source;
Link = link;
}
internal SeString? GetSeString() => this.Source switch {
internal SeString? GetSeString() => Source switch {
ChunkSource.None => null,
ChunkSource.Sender => this.Message?.SenderSource,
ChunkSource.Content => this.Message?.ContentSource,
ChunkSource.Sender => Message?.SenderSource,
ChunkSource.Content => Message?.ContentSource,
_ => null,
};
@@ -52,7 +52,7 @@ internal class TextChunk : Chunk {
internal string Content { get; set; }
internal TextChunk(ChunkSource source, Payload? link, string content) : base(source, link) {
this.Content = content;
Content = content;
}
#pragma warning disable CS8618
@@ -66,10 +66,10 @@ internal class TextChunk : Chunk {
public TextChunk NewWithStyle(ChunkSource source, Payload? link, string content)
{
return new TextChunk(source, link, content) {
FallbackColour = this.FallbackColour,
Foreground = this.Foreground,
Glow = this.Glow,
Italic = this.Italic,
FallbackColour = FallbackColour,
Foreground = Foreground,
Glow = Glow,
Italic = Italic,
};
}
}
@@ -78,7 +78,7 @@ internal class IconChunk : Chunk {
internal BitmapFontIcon Icon { get; set; }
public IconChunk(ChunkSource source, Payload? link, BitmapFontIcon icon) : base(source, link) {
this.Icon = icon;
Icon = icon;
}
public IconChunk() : base(ChunkSource.None, null) {