Skip to content

Commit

Permalink
fix: When checking the identity of a prefix of Lv2 or higher with a p…
Browse files Browse the repository at this point in the history
…rev, the prefixes at the higher level needed to be the same.
  • Loading branch information
ryooo committed Dec 2, 2024
1 parent a3f67bf commit af70759
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app/scripts/content/channel-grouper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ export default class ChannelGrouper {
connection2 = null;
} else if (context.prefix2 != prev?.prefix2 && context.prefix2 == next?.prefix2) {
connection2 = '┬';
} else if (context.prefix2 == prev?.prefix2 && context.prefix2 == next?.prefix2) {
connection2 = '├';
} else if (context.prefix2 == prev?.prefix2 && context.prefix2 != next?.prefix2) {
connection2 = '└';
} else if (context.prefix == prev?.prefix && context.prefix2 == prev?.prefix2) {
if (context.prefix2 == next?.prefix2) {
connection2 = '├';
} else if (context.prefix2 != next?.prefix2) {
connection2 = '└';
}
}

let connection3: ConnectionType | null = null;
Expand All @@ -157,10 +159,12 @@ export default class ChannelGrouper {
connection3 = null;
} else if (context.prefix3 != prev?.prefix3 && context.prefix3 == next?.prefix3) {
connection3 = '┬';
} else if (context.prefix3 == prev?.prefix3 && context.prefix3 == next?.prefix3) {
connection3 = '├';
} else if (context.prefix3 == prev?.prefix3 && context.prefix3 != next?.prefix3) {
connection3 = '└';
} else if (context.prefix == prev?.prefix && context.prefix2 == prev?.prefix2 && context.prefix3 == prev?.prefix3) {
if (context.prefix3 == next?.prefix3) {
connection3 = '├';
} else if (context.prefix3 != next?.prefix3) {
connection3 = '└';
}
}

return {
Expand Down

0 comments on commit af70759

Please sign in to comment.