It’s hard to tell if President Trump means much of what he tweet-threats. This weekend, for example, he threatened to shut down the government just 99 days before Republicans try to keep their majorities in Congress in the midterm elections. Trump has threatened as much twice before only to back off.

But there’s one thing we can deduce is on Trump’s mind when he tweets like he did over this weekend: He’s picking fights he thinks are popular with his base.

Just look at the three main topics Trump spouted off this weekend from his golf course in New Jersey. In all three, Trump was the one initiating the drama.

1. Russia and attacking the Mueller probe as partisan. Polls appear to show those attacks are working, giving Trump voters — who, like many Americans, are already primed to view life through a partisan lens — a reason to doubt the independent investigation into Russian interference.

Despite the fact that the probe is led by a Republican and set up by Trump’s own Justice Department, a July Washington Post poll finds 86 percent of Republicans think the question of whether Trump's campaign may have colluded with Russia is more of a distraction than a serious issue.

2. Immigration, specifically the wall: It doesn't take a political strategist to know that one of Trump's main appeals to voters is his promise to get tough on immigrants from Central and South America. From Day One of his campaign, Trump leaned on racially charged language and extreme policies, like building a wall along much of the U.S.-Mexico border, to appeal to voters.

The problem for Trump is that, a year and a half into his presidency, he hasn't made good on that promise. And Trump seems to know that time could be running out to make significant progress on this. Since Mexico has nixed the notion of paying for it outright, Trump has one more major budget battle this fall to get Congress to approve billions for his wall. A few weeks after that Sept. 30 deadline, it's possible and even likely that Democrats will take back control of the House of Representatives.

Republicans in Congress loathe the idea of a shutdown weeks before they have to face voters. But Trump seems to think this is good politics for him, The Washington Post reports. So it looks like he decided to pick a fight with his own party this weekend over an issue he fears he may be losing ground on.

3. Attacking the media: There is perhaps nothing more Trumpian than this. The media is Trump's go-to foil for just about everything that he and his administration have struggled with: from his eyebrow-raising deferential treatment of Russian President Vladimir Putin, to North Korea's questionable efforts to denuclearize after sort-of agreeing to do so with Trump, to his administration's decision to separate families at the border.

Trump goes after journalists so much so that his rhetoric has elevated to a level that, leaders of the industry fear, is dangerous for journalists' safety around the world. We now know that the publisher of the New York Times met with Trump earlier this month and told him as much. It was a private conversation, but Trump decided to make it very, very public. Rather than acknowledge the impact Times publisher A.G. Sulzberger says his words are having, Trump repeated one of his most controversial phrases: calling journalists “the enemy of the people.”

Trump, in other words, clearly wanted to keep up his attacks on the media. And he used what was supposed to be a detente to escalate it.

Politicizing the Russia investigation. Drumming up support for his wall. Attacking the media. Trump spent this weekend seeking out fights.

Why is another question entirely.

His patterns give us some clues. Maybe these things were being discussed on his favorite news channel, Fox News, and he wanted to chime in. But it's also worth noting that Trump is on the defensive this summer. He is just one week removed from one of the worst weeks of his presidency so far — the Helsinki summit with Putin — and less than 100 days out from congressional, gubernatorial and state legislative elections that will likely be a referendum on him.

In that light, Trump's base-pleasing-fight-picking this weekend makes a lot of sense.