Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
16abca56
Commit
16abca56
authored
4 months ago
by
Eric Oulashin
Browse files
Options
Downloads
Patches
Plain Diff
DDMsgReader: Display loading dots when counting sub-boards during indexed mode newscan
parent
8e350123
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!485
DDMsgReader: When doing an indexed newscan, display the progress percentage when counting sub-boards for indexed newscan. For issue #846
Pipeline
#7430
passed
4 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/DDMsgReader/DDMsgReader.js
+12
-13
12 additions, 13 deletions
xtrn/DDMsgReader/DDMsgReader.js
with
12 additions
and
13 deletions
xtrn/DDMsgReader/DDMsgReader.js
+
12
−
13
View file @
16abca56
...
@@ -16716,6 +16716,12 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
...
@@ -16716,6 +16716,12 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
var scanScope = (isValidScanScopeVal(pScanScope) ? pScanScope : SCAN_SCOPE_ALL);
var scanScope = (isValidScanScopeVal(pScanScope) ? pScanScope : SCAN_SCOPE_ALL);
var newScanOnly = (typeof(pNewscanOnly) === "boolean" ? pNewscanOnly : false);
var newScanOnly = (typeof(pNewscanOnly) === "boolean" ? pNewscanOnly : false);
// Display an initial loading text, since the following may take some time
// for BBSes with many sub-boards
console.attributes = "N";
console.crlf();
console.print("Loading...");
// Note: DDlightbarMenu supports non-ANSI terminals with a more traditional UI
// Note: DDlightbarMenu supports non-ANSI terminals with a more traditional UI
// of listing the items and letting the user choose one by typing its number.
// of listing the items and letting the user choose one by typing its number.
// If we are to use the traditional interface, the menu will be in numbered mode,
// If we are to use the traditional interface, the menu will be in numbered mode,
...
@@ -16780,14 +16786,6 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
...
@@ -16780,14 +16786,6 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
}
}
else
else
DigDistMsgReader_IndexedModeChooseSubBoard.selectedItemIdx = this.indexedModeMenu.selectedItemIdx;
DigDistMsgReader_IndexedModeChooseSubBoard.selectedItemIdx = this.indexedModeMenu.selectedItemIdx;
// New
//console.print("\x01n\r\nScanning...\x01;"); // Temporary
// 1 2 3
// 123456789012345678901234567890
// Progress: 100%
//var numBlocks = console.screen_columns - 15;
//var numBlocksPerPercent = 100.0 / numBlocks;
// End New
// Ensure the menu is clear, and (re-)populate the menu with sub-board information w/ # of new messages in each, etc.
// Ensure the menu is clear, and (re-)populate the menu with sub-board information w/ # of new messages in each, etc.
// Also, build an array of sub-board codes for each menu item.
// Also, build an array of sub-board codes for each menu item.
// Also, display loading percentage while this is happening.
// Also, display loading percentage while this is happening.
...
@@ -16797,12 +16795,9 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
...
@@ -16797,12 +16795,9 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
DigDistMsgReader_IndexedModeChooseSubBoard.selectedItemIdx = 0;
DigDistMsgReader_IndexedModeChooseSubBoard.selectedItemIdx = 0;
var numSubBoards = 0;
var numSubBoards = 0;
var totalNewMsgs = 0;
var totalNewMsgs = 0;
console.attributes = "N";
console.crlf();
printf("Loading: %0.2f% ", 0.0);
// The total number of sub-boards we'll scan - For displaying the progress percentage
// The total number of sub-boards we'll scan - For displaying the progress percentage
if (typeof(DigDistMsgReader_IndexedModeChooseSubBoard.totalNumSubBoards) !== "number")
if (typeof(DigDistMsgReader_IndexedModeChooseSubBoard.totalNumSubBoards) !== "number")
DigDistMsgReader_IndexedModeChooseSubBoard.totalNumSubBoards = countSubBoardsForScanning(scanScope, newScanOnly);
DigDistMsgReader_IndexedModeChooseSubBoard.totalNumSubBoards = countSubBoardsForScanning(scanScope, newScanOnly
, true
);
// Load the menu
// Load the menu
for (var grpIdx = 0; grpIdx < msg_area.grp_list.length; ++grpIdx)
for (var grpIdx = 0; grpIdx < msg_area.grp_list.length; ++grpIdx)
{
{
...
@@ -25747,8 +25742,9 @@ function countOccurrencesInStr(pStr, pSubstr)
...
@@ -25747,8 +25742,9 @@ function countOccurrencesInStr(pStr, pSubstr)
// Counts the number of sub-boards that would be scanned for the user,
// Counts the number of sub-boards that would be scanned for the user,
// considering their sub-board access, for a particular scan scope
// considering their sub-board access, for a particular scan scope
function countSubBoardsForScanning(pScanScope, pNewScanOnly)
function countSubBoardsForScanning(pScanScope, pNewScanOnly
, pDisplayStatusDots
)
{
{
var displayStatusDots = (typeof(pDisplayStatusDots) === "boolean" ? pDisplayStatusDots : false);
var numSubBoards = 0;
var numSubBoards = 0;
for (var grpIdx = 0; grpIdx < msg_area.grp_list.length; ++grpIdx)
for (var grpIdx = 0; grpIdx < msg_area.grp_list.length; ++grpIdx)
{
{
...
@@ -25767,6 +25763,9 @@ function countSubBoardsForScanning(pScanScope, pNewScanOnly)
...
@@ -25767,6 +25763,9 @@ function countSubBoardsForScanning(pScanScope, pNewScanOnly)
if (pScanScope == SCAN_SCOPE_SUB_BOARD && bbs.cursub != subIdx)
if (pScanScope == SCAN_SCOPE_SUB_BOARD && bbs.cursub != subIdx)
continue;
continue;
++numSubBoards;
++numSubBoards;
// If we are to display status dots, then display a dot for every 4 sub-boards
if (displayStatusDots && numSubBoards % 4 == 0)
console.print(".");
}
}
}
}
return numSubBoards;
return numSubBoards;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment