You're right that the party lost about a third of their seats, Basseting - this from bbc website -
"The party won 35 of the 59 Scottish constituencies - a fall of 21 seats from the 56 they won in 2015.
The Conservatives secured 13 seats in Scotland - the party's best performance in the country since 1983.
Labour won seven seats and the Lib Dems four. The three pro-UK parties had won just one seat each in 2015."
BUT that's still a hoor of a good result for the SNP; they managed to secure more seats than all other parties put together. Compare with the Conservatives having to buy the DUP to avoid a hung parliament in Westminster. And, what's this got to do with the flag non-true story?