Perhaps I risk the wrath of One Direction fans when I say this, but I'm gonna be brutally honest right now: Ed Sheeran isn't writing songs for One Direction anymore at the request of his record label, and this might be not so good news for the band's next album. I mean, sure, it'll probably sell well, but from a creative standpoint? Well, don't expect any songs like "Little Things" or "Moments" to be on there — after all, those were both written by Sheeran.
So, why the sudden change of heart? It wasn't Sheeran's decision at all, so don't worry, there's no feud — it was actually Sheeran's record company, Atlantic Records, that was (in Sheeran's own words) "annoyed" by the fact that Sheeran's best-performing song was being performed by an entirely different band. Sheeran divulged his ban during an interview with an Australian radio station:
I wasn’t gonna do it… Basically, my record label got very annoyed that my first Number One was a song that I gave to someone else, and they were kind of like, 'Don’t do it.' [...] [The songs were] written specifically for them.
While One Direction has had hits without Sheeran before, it's not going to be the same without everyone's favorite ginger at least submitting a few tracks to the next album. At least we'll always have this...